buildpackage-rpm: support special tree-ish names in --git-upstream-tree
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>
Fri, 24 Aug 2012 13:32:44 +0000 (16:32 +0300)
committerJun Wang <junbill.wang@samsung.com>
Wed, 27 Jan 2016 14:12:18 +0000 (22:12 +0800)
Support special 'WC*' and 'INDEX' values for the --git-upstream-tree
option.

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Conflicts:
gbp/scripts/buildpackage_rpm.py

gbp/scripts/buildpackage_rpm.py

index 37f1819..7e10c46 100755 (executable)
@@ -359,7 +359,6 @@ def create_packaging_tag(repo, tag, commit, version, options):
                     keyid=options.keyid, commit=commit)
 
 
-<<<<<<< HEAD
 def disable_hooks(options):
     """Disable all hooks (except for builder)"""
     for hook in ['cleaner', 'postexport', 'prebuild', 'postbuild', 'posttag']:
@@ -370,9 +369,6 @@ def disable_hooks(options):
 
 def parse_args(argv, prefix, git_treeish=None):
     """Parse config and command line arguments"""
-=======
-def parse_args(argv, prefix):
->>>>>>> 57b7a4e... buildpackage-rpm: add more tagging options
     args = [ arg for arg in argv[1:] if arg.find('--%s' % prefix) == 0 ]
     builder_args = [ arg for arg in argv[1:] if arg.find('--%s' % prefix) == -1 ]
 
@@ -659,28 +655,14 @@ def main(argv):
 
         # Tag (note: tags the exported version)
         if options.tag or options.tag_only:
-<<<<<<< HEAD
-<<<<<<< HEAD
             gbp.log.info("Tagging %s" % RpmPkgPolicy.compose_full_version(spec.version))
             commit_info = repo.get_commit_info(tree)
             tag = packaging_tag_name(repo, spec, commit_info, options)
-=======
-            gbp.log.info("Tagging %s" % spec.version)
-            tag = repo.version_to_tag(options.packaging_tag, dict(upstreamversion=spec.version), options.vendor)
->>>>>>> 96a8aae... rpm: add version parsing functions to pkg policy
-=======
-            gbp.log.info("Tagging %s" % RpmPkgPolicy.compose_full_version(spec.version))
-            commit_info = repo.get_commit_info(tree)
-            tag = packaging_tag_name(repo, spec, commit_info, options)
->>>>>>> 57b7a4e... buildpackage-rpm: add more tagging options
             if options.retag and repo.has_tag(tag):
                 repo.delete_tag(tag)
             create_packaging_tag(repo, tag, commit=tree, version=spec.version,
                                  options=options)
-<<<<<<< HEAD
             vcs_info = get_vcs_info(repo, tag)
-=======
->>>>>>> 57b7a4e... buildpackage-rpm: add more tagging options
             if options.posttag:
                 sha = repo.rev_parse("%s^{}" % tag)
                 Command(options.posttag, shell=True,
@@ -718,11 +700,7 @@ def main(argv):
             summary = "Gbp-rpm %s" % ["failed", "successful"][not retval]
             pkg_evr = {'upstreamversion': spec.version}
             message = ("Build of %s %s %s" % (spec.name,
-<<<<<<< HEAD
                             RpmPkgPolicy.compose_full_version(spec.version),
-=======
-                            RpmPkgPolicy.compose_full_version(pkg_evr),
->>>>>>> 96a8aae... rpm: add version parsing functions to pkg policy
                             ["failed", "succeeded"][not retval]))
             if not gbp.notifications.notify(summary, message, options.notify):
                 gbp.log.err("Failed to send notification")