Accept arbitrary refname instead of using os/version/name

I want to use "fedostree" for now, so let's allow the caller to
specify whatever refname they want.
This commit is contained in:
Colin Walters 2014-01-12 13:46:49 -05:00
parent dd6d65d1f4
commit 8250481b46

View File

@ -277,6 +277,10 @@ def main():
action='store', action='store',
default=None, default=None,
help="Sign commits using given GPG key ID") help="Sign commits using given GPG key ID")
parser.add_option('', "--name",
action='store',
default=None,
help="Use NAME as ref name")
parser.add_option('', "--os", parser.add_option('', "--os",
action='store', dest='os', action='store', dest='os',
default=None, default=None,
@ -298,8 +302,9 @@ def main():
global args global args
(opts, args) = parser.parse_args(sys.argv[1:]) (opts, args) = parser.parse_args(sys.argv[1:])
if (opts.os is None or if (opts.deploy and
opts.os_version is None): (opts.os is None or
opts.os_version is None)):
f = open('/etc/os-release') f = open('/etc/os-release')
for line in f.readlines(): for line in f.readlines():
if line == '': continue if line == '': continue
@ -316,8 +321,7 @@ def main():
action = args[0] action = args[0]
if action == 'create': if action == 'create':
branchname = args[1] ref = args[1]
ref = '%s/%s/%s' % (opts.os, opts.os_version, branchname)
packages = args[2:] packages = args[2:]
commit_message = 'Commit of %d packages' % (len(packages), ) commit_message = 'Commit of %d packages' % (len(packages), )
else: else: