summaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@google.com>2007-05-23 21:29:34 (GMT)
committerHan-Wen Nienhuys <hanwen@google.com>2007-05-28 14:19:10 (GMT)
commitb76f0565bfcfedba9e8920aa5120fc97796b642f (patch)
tree78d51f387009cae7d1f94faa4278d4782e09df3c /contrib/fast-import
parent8b41a97f8a3e2778ce733cd3d7e181bc28cc43a0 (diff)
downloadgit-b76f0565bfcfedba9e8920aa5120fc97796b642f.zip
git-b76f0565bfcfedba9e8920aa5120fc97796b642f.tar.gz
git-b76f0565bfcfedba9e8920aa5120fc97796b642f.tar.bz2
use string.strip() iso. slicing.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-xcontrib/fast-import/git-p48
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 51d117b..ac446a8 100755
--- 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):
+ lie = line.strip()
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.initialParents[self.refPrefix + branch] = parseRevision(line[:-1])
+ self.initialParents[self.refPrefix + branch] = parseRevision(line)
def createOrUpdateBranchesFromOrigin(self):
if not self.silent: