diff options
author | Guido Guenther <agx@sigxcpu.org> | 2007-02-02 15:10:06 +0100 |
---|---|---|
committer | Guido Guenther <agx@bogon.sigxcpu.org> | 2007-02-02 15:10:06 +0100 |
commit | d3bfa10ba8c609a3e5de2717a019239b353d03a7 (patch) | |
tree | 2ee68971a066bb4a35640658538c33dbde202ee4 /git-import-orig | |
parent | 55664883c7d0a6f42a672eca947c908cfae971e1 (diff) | |
download | git-buildpackage-d3bfa10ba8c609a3e5de2717a019239b353d03a7.tar.gz git-buildpackage-d3bfa10ba8c609a3e5de2717a019239b353d03a7.tar.bz2 git-buildpackage-d3bfa10ba8c609a3e5de2717a019239b353d03a7.zip |
Allow to specify the tag format
The format of generated tags can now be specified via the debian-tag and
upsteam-tag options. The default now puts debian tags and upstream tags into
different namespaces (Closes: #408990)
Diffstat (limited to 'git-import-orig')
-rwxr-xr-x | git-import-orig | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/git-import-orig b/git-import-orig index 3df66392..62935ef2 100755 --- a/git-import-orig +++ b/git-import-orig @@ -26,7 +26,7 @@ import glob import git_buildpackage from git_buildpackage.git_utils import (GitRepositoryError, GitRepository, - sanitize_version) + build_tag) from git_buildpackage.config import GBPOptionParser @@ -72,6 +72,8 @@ def main(argv): help="sign git tags", action="store_true") parser.add_config_file_option(option_name="keyid", dest="keyid", help="GPG keyid to sign tags with") + parser.add_config_file_option(option_name="upstream-tag", dest="upstream_tag", + help="Format string for upstream tags, default is '%(upstream-tag)s'") (options, args) = parser.parse_args(argv[1:]) gitCheckoutUpstream = git_buildpackage.GitCheckoutBranch(options.upstream) @@ -89,7 +91,7 @@ def main(argv): tgz = args[0] try: - repo=GitRepository('.') + repo = GitRepository('.') except GitRepositoryError: print >>sys.stderr,"%s is not a git repository" % (os.path.abspath('.')) return 1 @@ -125,14 +127,14 @@ create it otherwise use --upstream-branch to specify it. else: if options.verbose: print "Unpacked orig to %s" % tmpdir - origdir=glob.glob(tmpdir+'/*')[0] + origdir = glob.glob(tmpdir+'/*')[0] try: print "Importing %s to upstream branch..." % tgz gitCheckoutUpstream() gitShowBranch() git_buildpackage.GitLoadDirs()(origdir) - git_buildpackage.GitTag(options.sign_tags, options.keyid)(sanitize_version(version)) + git_buildpackage.GitTag(options.sign_tags, options.keyid)(build_tag(options.upstream_tag, version)) if options.merge: print "Merging to %s" % (options.debian,) |