31
from debian_bundle.changelog import Version
33
from debian.changelog import Version
35
# Prior to 0.1.15 the debian module was called debian_bundle
36
from debian_bundle.changelog import Version
33
38
from bzrlib.revisionspec import RevisionSpec
164
169
ret.debian_version = "%d" % (prev_packaging_revnum+1)
173
def changelog_add_new_version(tree, version, distribution_name, changelog,
175
"""Add an entry to the changelog for a new version.
177
:param tree: WorkingTree in which the package lives
178
:param version: Version to add
179
:param distribution_name: Distribution name (debian, ubuntu, ...)
180
:param changelog: Changelog object
181
:param package: Package name
182
:return: Whether an entry was successfully added
184
from bzrlib.plugins.builddeb.merge_upstream import package_version
185
if "~bzr" in str(version) or "+bzr" in str(version):
186
entry_description = "New upstream snapshot."
188
entry_description = "New upstream release."
189
proc = subprocess.Popen(["dch", "-v",
190
str(package_version(version, distribution_name)),
191
"-D", "UNRELEASED", "--release-heuristic", "changelog",
192
entry_description], cwd=tree.basedir)
194
# FIXME: Raise insightful exception here rather than just checking
196
return proc.returncode == 0