summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-11-13 15:49:35 +0100
committerGuido Günther <agx@sigxcpu.org>2017-11-13 15:54:26 +0100
commitc429d979d43cd40179ace41f30eb15d5c43485fe (patch)
tree8611a7ac4d39850c58cc96de23d2201a17afe546
parentdbb58c59b6369069b1a323ae15dac97eb0a199c8 (diff)
dch: make --auto the default
The current default mode of looking at the version in the changelog only leads to problems when people build up the changelog incrementally. --auto mode handles this since many years so make this the default, there's still --since for finer control where to start from. Closes: #880552
-rw-r--r--gbp/scripts/dch.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/gbp/scripts/dch.py b/gbp/scripts/dch.py
index f2cab82e..9aea564d 100644
--- a/gbp/scripts/dch.py
+++ b/gbp/scripts/dch.py
@@ -263,6 +263,9 @@ def process_options(options, parser):
if options.since and options.auto:
parser.error("'--since' and '--auto' are incompatible options")
+ if not options.since and not options.auto:
+ options.auto = True
+
dch_options = []
if options.multimaint_merge:
dch_options.append("--multimaint-merge")
@@ -452,19 +455,13 @@ def main(argv):
if options.since:
since = options.since
else:
- since = ''
- if options.auto:
- since = guess_documented_commit(cp, repo, options.debian_tag)
- if since:
- msg = "Continuing from commit '%s'" % since
- else:
- msg = "Starting from first commit"
+ since = guess_documented_commit(cp, repo, options.debian_tag)
+ if since:
+ msg = "Continuing from commit '%s'" % since
+ else:
+ msg = "Starting from first commit"
gbp.log.info(msg)
- found_snapshot_banner = has_snapshot_banner(cp)
- else: # Fallback: continue from last tag
- since = repo.find_version(options.debian_tag, cp['Version'])
- if not since:
- raise GbpError("Version %s not found" % cp['Version'])
+ found_snapshot_banner = has_snapshot_banner(cp)
if args:
gbp.log.info("Only looking for changes on '%s'" % " ".join(args))