From b9aae056a67031db81376891c57663803e990ddc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Guido=20G=C3=BCnther?= Date: Mon, 10 Jan 2011 15:17:21 +0100 Subject: [PATCH] Make --[no-]merge a proper option so it can be configured via gbp.conf. --- docs/manpages/git-import-orig.sgml | 6 +++--- gbp.conf | 6 ++++-- gbp/config.py | 3 +++ 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 991ba51..b768fa9 100644 --- a/docs/manpages/git-import-orig.sgml +++ b/docs/manpages/git-import-orig.sgml @@ -23,7 +23,7 @@ version - + branch_name branch_name @@ -66,9 +66,9 @@ - + - Don't merge the upstream version to the development branch + Merge the upstream branch to the debian branch after import diff --git a/gbp.conf b/gbp.conf index 9ab4093..941d441 100644 --- a/gbp.conf +++ b/gbp.conf @@ -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 8448762..51dc7e6 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 9a09605..c735783 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") -- 2.7.4