use string.strip() iso. slicing.

Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
maint
Han-Wen Nienhuys 2007-05-23 18:29:34 -03:00
parent 8b41a97f8a
commit b76f0565bf
1 changed files with 4 additions and 4 deletions

View File

@ -845,15 +845,15 @@ class P4Sync(Command):
cmdline += " --branches" cmdline += " --branches"


for line in read_pipe_lines(cmdline): for line in read_pipe_lines(cmdline):
lie = line.strip()
if self.importIntoRemotes and ((not line.startswith("p4/")) or line == "p4/HEAD\n"): if self.importIntoRemotes and ((not line.startswith("p4/")) or line == "p4/HEAD\n"):
continue continue
if self.importIntoRemotes: if self.importIntoRemotes:
# strip off p4 # strip off p4
branch = line[3:-1] branch = re.sub ("^p4/", "", line)
else:
branch = line[:-1]
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): def createOrUpdateBranchesFromOrigin(self):
if not self.silent: if not self.silent: