From: Han-Wen Nienhuys Date: Wed, 23 May 2007 21:29:34 +0000 (-0300) Subject: use string.strip() iso. slicing. X-Git-Tag: v1.5.3-rc0~65^2^2~40 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b76f0565bfcfedba9e8920aa5120fc97796b642f;p=git.git use string.strip() iso. slicing. Signed-off-by: Han-Wen Nienhuys --- diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 51d117b78..ac446a8dc 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: