summaryrefslogtreecommitdiff
path: root/gbp/scripts
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2013-04-29 14:31:43 +0200
committerGuido Günther <agx@sigxcpu.org>2013-04-29 14:38:11 +0200
commitaee9284d3dba4ab415321a2e389d62fe49ff9b91 (patch)
tree9142582477e1a6d776bba818227da1a85c5a1568 /gbp/scripts
parentc77843aa8837424a4fbe343d8ce909f33acc8a0e (diff)
dch: Use DebianSource.is_native
instead of ChangeLog.is_native since the former used debian/source/format in favor of debian/changelog.
Diffstat (limited to 'gbp/scripts')
-rw-r--r--gbp/scripts/dch.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/gbp/scripts/dch.py b/gbp/scripts/dch.py
index 66da519..12eae36 100644
--- a/gbp/scripts/dch.py
+++ b/gbp/scripts/dch.py
@@ -28,6 +28,7 @@ import gbp.log
from gbp.config import GbpOptionParserDebian, GbpOptionGroup
from gbp.errors import GbpError
from gbp.deb import compare_versions
+from gbp.deb.source import DebianSource, DebianSourceError
from gbp.deb.git import GitRepositoryError, DebianGitRepository
from gbp.deb.changelog import ChangeLog, NoChangeLogError
@@ -376,7 +377,8 @@ def main(argv):
gbp.log.err("You are not on branch '%s' but on '%s'" % (options.debian_branch, branch))
raise GbpError("Use --ignore-branch to ignore or --debian-branch to set the branch name.")
- cp = ChangeLog(filename=changelog)
+ source = DebianSource('.')
+ cp = source.changelog
if options.since:
since = options.since
@@ -426,7 +428,7 @@ def main(argv):
else:
add_section = False
- if add_section and not version_change and not cp.is_native():
+ if add_section and not version_change and not source.is_native():
# Get version from upstream if none provided
v = guess_version_from_upstream(repo, options.upstream_tag, cp)
if v:
@@ -491,7 +493,11 @@ def main(argv):
repo.commit_files([changelog], msg)
gbp.log.info("Changelog has been committed for version %s" % version)
- except (gbpc.CommandExecFailed, GbpError, GitRepositoryError, NoChangeLogError) as err:
+ except (gbpc.CommandExecFailed,
+ GbpError,
+ GitRepositoryError,
+ DebianSourceError,
+ NoChangeLogError) as err:
if len(err.__str__()):
gbp.log.err(err)
ret = 1