Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Fix git-dir option and allow reading log substitutions from a file
author
Simon Hausmann
<hausmann@kde.org>
Tue, 13 Mar 2007 08:14:45 +0000
(09:14 +0100)
committer
Simon Hausmann
<hausmann@kde.org>
Tue, 13 Mar 2007 08:14:45 +0000
(09:14 +0100)
Signed-off-by: Simon Hausmann <hausmann@kde.org>
contrib/fast-import/p4-git-sync.py
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
0bcff61
)
diff --git
a/contrib/fast-import/p4-git-sync.py
b/contrib/fast-import/p4-git-sync.py
index 8982e45345cb120e675285e480c6ceb9c585c801..0c0f629a1d6898147a862b08cbd0bafc94b6da89 100755
(executable)
--- 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:
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)
except getopt.GetoptError:
print "fixme, syntax error"
sys.exit(1)
@@
-63,6
+63,10
@@
def p4Cmd(cmd):
key = a.split("%")[0]
value = a.split("%")[1]
logSubstitutions[key] = value
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"
if len(gitdir) == 0:
gitdir = ".git"