提交 b76f0565 编写于 作者: H Han-Wen Nienhuys

use string.strip() iso. slicing.

Signed-off-by: NHan-Wen Nienhuys <hanwen@google.com>
上级 8b41a97f
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册