Fix git-dir option and allow reading log substitutions from a file
Signed-off-by: Simon Hausmann <hausmann@kde.org>
This commit is contained in:
@ -32,8 +32,8 @@ def p4Cmd(cmd):
|
|||||||
return result;
|
return result;
|
||||||
|
|
||||||
try:
|
try:
|
||||||
opts, args = getopt.getopt(sys.argv[1:], "", [ "continue", "--git-dir=", "origin=", "reset", "master=",
|
opts, args = getopt.getopt(sys.argv[1:], "", [ "continue", "git-dir=", "origin=", "reset", "master=",
|
||||||
"submit-log-subst=" ])
|
"submit-log-subst=", "log-substitutions=" ])
|
||||||
except getopt.GetoptError:
|
except getopt.GetoptError:
|
||||||
print "fixme, syntax error"
|
print "fixme, syntax error"
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
@ -63,6 +63,10 @@ for o, a in opts:
|
|||||||
key = a.split("%")[0]
|
key = a.split("%")[0]
|
||||||
value = a.split("%")[1]
|
value = a.split("%")[1]
|
||||||
logSubstitutions[key] = value
|
logSubstitutions[key] = value
|
||||||
|
elif o == "--log-substitutions":
|
||||||
|
for line in open(a, "r").readlines():
|
||||||
|
tokens = line[:-1].split("=")
|
||||||
|
logSubstitutions[tokens[0]] = tokens[1]
|
||||||
|
|
||||||
if len(gitdir) == 0:
|
if len(gitdir) == 0:
|
||||||
gitdir = ".git"
|
gitdir = ".git"
|
||||||
|
Reference in New Issue
Block a user