diff options
author | Han-Wen Nienhuys <hanwen@google.com> | 2007-05-23 18:29:34 -0300 |
---|---|---|
committer | Han-Wen Nienhuys <hanwen@google.com> | 2007-05-28 11:19:10 -0300 |
commit | b76f0565bfcfedba9e8920aa5120fc97796b642f (patch) | |
tree | 78d51f387009cae7d1f94faa4278d4782e09df3c /contrib | |
parent | clone and sync --keep-path to keep perforce path to module. (diff) | |
download | tgif-b76f0565bfcfedba9e8920aa5120fc97796b642f.tar.xz |
use string.strip() iso. slicing.
Signed-off-by: Han-Wen Nienhuys <hanwen@google.com>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/fast-import/git-p4 | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index 51d117b789..ac446a8dc4 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: |