diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-01-10 15:17:21 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-01-11 06:46:03 +0100 |
commit | b9aae056a67031db81376891c57663803e990ddc (patch) | |
tree | 9f4da0d1f981cfb1b22126ad2be4296c7bbe9f5f | |
parent | ec27521aea1bd3f11104a09457ce4df7bb23019d (diff) | |
download | git-buildpackage-b9aae056a67031db81376891c57663803e990ddc.tar.gz git-buildpackage-b9aae056a67031db81376891c57663803e990ddc.tar.bz2 git-buildpackage-b9aae056a67031db81376891c57663803e990ddc.zip |
Make --[no-]merge a proper option
so it can be configured via gbp.conf.
-rw-r--r-- | docs/manpages/git-import-orig.sgml | 6 | ||||
-rw-r--r-- | gbp.conf | 6 | ||||
-rw-r--r-- | gbp/config.py | 3 | ||||
-rwxr-xr-x | git-import-orig | 8 |
4 files changed, 12 insertions, 11 deletions
diff --git a/docs/manpages/git-import-orig.sgml b/docs/manpages/git-import-orig.sgml index 991ba51f..b768fa9a 100644 --- a/docs/manpages/git-import-orig.sgml +++ b/docs/manpages/git-import-orig.sgml @@ -23,7 +23,7 @@ <arg><option>--verbose</option></arg> <arg><option>--upstream-version=</option><replaceable>version</replaceable></arg> - <arg><option>--no-merge</option></arg> + <arg><option>--[no-]merge</option></arg> <arg><option>--upstream-branch=</option><replaceable>branch_name</replaceable></arg> <arg><option>--debian-branch=</option><replaceable>branch_name</replaceable></arg> <arg><option>--[no-]sign-tags</option></arg> @@ -66,9 +66,9 @@ </listitem> </varlistentry> <varlistentry> - <term><option>--no-merge</option></term> + <term><option>--merge</option></term> <listitem> - <para>Don't merge the upstream version to the development branch</para> + <para>Merge the upstream branch to the debian branch after import</para> </listitem> </varlistentry> @@ -46,15 +46,17 @@ # Options only affecting git-import-orig [git-import-orig] -# set a different upstream branches to import to: +# set a different upstream branch to import to: #upstream-branch = newupstream # set a different branch to merge to: #debian-branch = dfsgclean +# don't merge to debian branch by default: +#merge = False # import filter: #filter = .svn # filter out files from tarball passed to pristine tar: #filter-pristine-tar = True -# hook run after the import: +# run hook after the import: #postimport = git-dch -N%(version)s -S -a --debian-branch=$GBP_BRANCH # emulate old behaviour of calling dch: #postimport = dch -v%(version)s New Upstream Version diff --git a/gbp/config.py b/gbp/config.py index 8448762c..51dc7e68 100644 --- a/gbp/config.py +++ b/gbp/config.py @@ -95,6 +95,7 @@ class GbpOptionParser(OptionParser): 'spawn-editor' : 'release', 'patch-numbers' : 'True', 'notify' : 'auto', + 'merge' : 'True', } help = { 'debian-branch': @@ -151,6 +152,8 @@ class GbpOptionParser(OptionParser): "Whether to number patch files, default is %(patch-numbers)s", 'notify': "Whether to send a desktop notification after the build, default is '%(notify)s'", + 'merge': + "after the import merge the result to the debian branch, default is '%(merge)s'", } config_files = [ '/etc/git-buildpackage/gbp.conf', os.path.expanduser('~/.gbp.conf'), diff --git a/git-import-orig b/git-import-orig index 9a096053..c735783b 100755 --- a/git-import-orig +++ b/git-import-orig @@ -187,8 +187,6 @@ def main(argv): gbp.log.err(err) return 1 - cl_group = GbpOptionGroup(parser, "changelog mangling", - "options for mangling the changelog after the import") import_group = GbpOptionGroup(parser, "import options", "pristine-tar and filtering") tag_group = GbpOptionGroup(parser, "tag options", @@ -197,7 +195,7 @@ def main(argv): "version number and branch layout options") cmd_group = GbpOptionGroup(parser, "external command options", "how and when to invoke external commands and hooks") - for group in [import_group, branch_group, cl_group, tag_group, cmd_group ]: + for group in [import_group, branch_group, tag_group, cmd_group ]: parser.add_option_group(group) branch_group.add_option("-u", "--upstream-version", dest="version", @@ -206,9 +204,7 @@ def main(argv): dest="debian_branch") branch_group.add_config_file_option(option_name="upstream-branch", dest="upstream_branch") - branch_group.add_option("--no-merge", dest='merge', action="store_false", - default=True, - help="after import dont do any merging to another branch") + branch_group.add_boolean_config_file_option(option_name="merge", dest="merge") tag_group.add_boolean_config_file_option(option_name="sign-tags", dest="sign_tags") |