Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
use string.strip() iso. slicing.
author
Han-Wen Nienhuys
<hanwen@google.com>
Wed, 23 May 2007 21:29:34 +0000
(18:29 -0300)
committer
Han-Wen Nienhuys
<hanwen@google.com>
Mon, 28 May 2007 14:19:10 +0000
(11:19 -0300)
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
contrib/fast-import/git-p4
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
8b41a97
)
diff --git
a/contrib/fast-import/git-p4
b/contrib/fast-import/git-p4
index 51d117b789ef2dec4c85e9db62f93b1912fd6f0d..ac446a8dc4f2e98e690e6b64dda8cf004befbbb0 100755
(executable)
--- a/
contrib/fast-import/git-p4
+++ b/
contrib/fast-import/git-p4
@@
-845,15
+845,15
@@
class P4Sync(Command):
cmdline += " --branches"
for line in read_pipe_lines(cmdline):
cmdline += " --branches"
for line in read_pipe_lines(cmdline):
+ lie = line.strip()
if self.importIntoRemotes and ((not line.startswith("p4/")) or line == "p4/HEAD\n"):
continue
if self.importIntoRemotes:
# strip off p4
if self.importIntoRemotes and ((not line.startswith("p4/")) or line == "p4/HEAD\n"):
continue
if self.importIntoRemotes:
# strip off p4
- branch = line[3:-1]
- else:
- branch = line[:-1]
+ branch = re.sub ("^p4/", "", line)
+
self.p4BranchesInGit.append(branch)
self.p4BranchesInGit.append(branch)
- self.initialParents[self.refPrefix + branch] = parseRevision(line
[:-1]
)
+ self.initialParents[self.refPrefix + branch] = parseRevision(line)
def createOrUpdateBranchesFromOrigin(self):
if not self.silent:
def createOrUpdateBranchesFromOrigin(self):
if not self.silent: