summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2010-08-06 13:55:53 -0400
committerGuido Günther <agx@sigxcpu.org>2010-08-06 13:55:53 -0400
commit88afa6117ea4dd6b5d8fd88936afffb11c25ec47 (patch)
tree7109bd62cfdbfbfbbec58ddf5c00a8b4873ee6f2
parentf63c4ed85ca16a6869cf35bc9070e3c28163594e (diff)
downloadgit-buildpackage-88afa6117ea4dd6b5d8fd88936afffb11c25ec47.tar.gz
git-buildpackage-88afa6117ea4dd6b5d8fd88936afffb11c25ec47.tar.bz2
git-buildpackage-88afa6117ea4dd6b5d8fd88936afffb11c25ec47.zip
Pass --multimaint-merge on to dch
Closes: #586165
-rw-r--r--debian/control2
-rw-r--r--docs/manpages/git-dch.sgml8
-rw-r--r--gbp/config.py5
-rwxr-xr-xgit-dch28
4 files changed, 36 insertions, 7 deletions
diff --git a/debian/control b/debian/control
index e60f3b22..c9a63cab 100644
--- a/debian/control
+++ b/debian/control
@@ -12,7 +12,7 @@ Homepage: https://honk.sigxcpu.org/piki/projects/git-buildpackage/
Package: git-buildpackage
Architecture: all
-Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, devscripts (>= 2.10.49),
+Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}, devscripts (>= 2.10.66~),
git (>= 1:1.7.0.4-2) | git-core (>= 1:1.5.0.1-1), python-dateutil
Recommends: pristine-tar (>= 0.5)
Suggests: git-load-dirs
diff --git a/docs/manpages/git-dch.sgml b/docs/manpages/git-dch.sgml
index e8683eb0..5b64e196 100644
--- a/docs/manpages/git-dch.sgml
+++ b/docs/manpages/git-dch.sgml
@@ -35,6 +35,7 @@
<arg><option>--snapshot-number=</option><replaceable>expression</replaceable></arg>
<arg><option>--git-log=</option><replaceable>git-log-options</replaceable></arg>
<arg><option>--[no-]git-author</option></arg>
+ <arg><option>--[no-]multimaint-merge</option></arg>
<arg choice="plain"><replaceable>[path1 path2]</replaceable></arg>
</cmdsynopsis>
</refsynopsisdiv>
@@ -204,6 +205,13 @@
<para>Use user.name and user.email from <application>git-config</application>(1) for changelog trailer.</para>
</listitem>
</varlistentry>
+ <varlistentry>
+ <term><option>--[no]-multimaintmerge</option>
+ </term>
+ <listitem>
+ <para>Merge commits by maintainer.</para>
+ </listitem>
+ </varlistentry>
</variablelist>
</refsect1>
<refsect1>
diff --git a/gbp/config.py b/gbp/config.py
index d8b22213..10e1a5b9 100644
--- a/gbp/config.py
+++ b/gbp/config.py
@@ -59,7 +59,8 @@ class GbpOptionParser(OptionParser):
'ignore-regex' : '',
'compression' : 'auto',
'compression-level': '9',
- 'remote-url-pattern' : 'ssh://alioth.debian.org/git/collab-maint/%(pkg)s.git'
+ 'remote-url-pattern' : 'ssh://alioth.debian.org/git/collab-maint/%(pkg)s.git',
+ 'multimaint-merge' : 'False',
}
help = {
'debian-branch':
@@ -96,6 +97,8 @@ class GbpOptionParser(OptionParser):
"extract orig tarball when using export-dir option, default is '%(overlay)s'",
'remote-url-pattern':
"Remote url pattern to create the repo at, default is '%(remote-url-pattern)s'",
+ 'multimaint-merge':
+ "Merge commits by maintainer, default is '%(multimaint-merge)s'",
}
config_files = [ '/etc/git-buildpackage/gbp.conf',
os.path.expanduser('~/.gbp.conf'),
diff --git a/git-dch b/git-dch
index b1ce409f..79341c09 100755
--- a/git-dch
+++ b/git-dch
@@ -65,7 +65,18 @@ def punctuate_commit(msg):
return msg
return "%s.\n%s" % (first, rest)
-def spawn_dch(msg='', author=None, email=None, newversion=False, version=None, release=False, distribution=None):
+def spawn_dch(msg='', author=None, email=None, newversion=False, version=None,
+ release=False, distribution=None, dch_options=""):
+ """
+ Spawn dch
+ param author: committers name
+ param email: committers email
+ param newversion: start a new version
+ version: the verion to use
+ release: finalize changelog for releaze
+ distribution: distribution to use
+ dch_options: options passed verbatim to dch
+ """
distopt = ""
versionopt = ""
env = ""
@@ -88,15 +99,15 @@ def spawn_dch(msg='', author=None, email=None, newversion=False, version=None, r
if distribution:
distopt = "--distribution=%s" % distribution
- cmd = '%(env)s dch --no-auto-nmu %(distopt)s %(versionopt)s ' % locals()
+ cmd = '%(env)s dch --no-auto-nmu %(distopt)s %(versionopt)s %(dch_options)s ' % locals()
if type(msg) == type(''):
cmd += '-- "%s"' % escape_commit(msg)
system(cmd)
-def add_changelog_entry(msg, author, email):
+def add_changelog_entry(msg, author, email, dch_options):
"add a single changelog entry"
- spawn_dch(msg=msg, author=author, email=email)
+ spawn_dch(msg=msg, author=author, email=email, dch_options=dch_options)
def add_changelog_section(msg, distribution, author=None, email=None, version=None):
@@ -350,6 +361,8 @@ def main(argv):
type="int", metavar="N")
commit_group.add_config_file_option(option_name="ignore-regex", dest="ignore_regex",
help="Ignore commit lines matching regex, default is '%(ignore-regex)s'")
+ commit_group.add_boolean_config_file_option(option_name="multimaint-merge", dest="multimaint_merge")
+
(options, args) = parser.parse_args(argv[1:])
if options.snapshot and options.release:
@@ -358,6 +371,11 @@ def main(argv):
if options.since and options.auto:
parser.error("'--since' and '--auto' are incompatible options")
+ if options.multimaint_merge:
+ dch_options = "--multimaint-merge"
+ else:
+ dch_options = "--nomultimaint-merge"
+
try:
if options.verbose:
gbpc.Command.verbose = True
@@ -421,7 +439,7 @@ def main(argv):
# Adding a section only needs to happen once.
add_section = False
else:
- add_changelog_entry(commit_msg, commit_author, commit_email)
+ add_changelog_entry(commit_msg, commit_author, commit_email, dch_options)
# Show a message if there were no commits (not even ignored