diff options
author | Simon Hausmann <hausmann@kde.org> | 2007-03-13 09:14:45 +0100 |
---|---|---|
committer | Simon Hausmann <hausmann@kde.org> | 2007-03-13 09:14:45 +0100 |
commit | 5aba82fd5056fa57f467f3c5fe81fe71ee0e8b99 (patch) | |
tree | dfe15325874f72672f4086bdd92e8db9365c5f15 /contrib/fast-import | |
parent | First version of a new script to submit changes back to perforce from git rep... (diff) | |
download | tgif-5aba82fd5056fa57f467f3c5fe81fe71ee0e8b99.tar.xz |
Fix git-dir option and allow reading log substitutions from a file
Signed-off-by: Simon Hausmann <hausmann@kde.org>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-x | contrib/fast-import/p4-git-sync.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/fast-import/p4-git-sync.py b/contrib/fast-import/p4-git-sync.py index 8982e45345..0c0f629a1d 100755 --- a/contrib/fast-import/p4-git-sync.py +++ b/contrib/fast-import/p4-git-sync.py @@ -32,8 +32,8 @@ def p4Cmd(cmd): return result; try: - opts, args = getopt.getopt(sys.argv[1:], "", [ "continue", "--git-dir=", "origin=", "reset", "master=", - "submit-log-subst=" ]) + opts, args = getopt.getopt(sys.argv[1:], "", [ "continue", "git-dir=", "origin=", "reset", "master=", + "submit-log-subst=", "log-substitutions=" ]) except getopt.GetoptError: print "fixme, syntax error" sys.exit(1) @@ -63,6 +63,10 @@ for o, a in opts: key = a.split("%")[0] value = a.split("%")[1] 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: gitdir = ".git" |