summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 01a9c9c)
raw | patch | inline | side by side (parent: 01a9c9c)
author | Simon Hausmann <shausman@trolltech.com> | |
Tue, 22 May 2007 22:15:50 +0000 (00:15 +0200) | ||
committer | Simon Hausmann <shausman@trolltech.com> | |
Tue, 22 May 2007 22:15:50 +0000 (00:15 +0200) |
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
contrib/fast-import/git-p4 | patch | blob | history |
index 3d97ce1a247ad31df911975d59aed6add21091ec..152c3c1ca56a0376a765312c87f6f9cfd1259c3f 100755 (executable)
cmdline += " --branches"
for line in mypopen(cmdline).readlines():
- if line.startswith("p4/") and line != "p4/HEAD\n":
+ if self.importIntoRemotes and ((not line.startswith("p4/")) or line == "p4/HEAD\n"):
+ continue
+ if self.importIntoRemotes:
+ # strip off p4
branch = line[3:-1]
- self.p4BranchesInGit.append(branch)
- self.initialParents[self.refPrefix + branch] = parseRevision(line[:-1])
+ else:
+ branch = line[:-1]
+ self.p4BranchesInGit.append(branch)
+ self.initialParents[self.refPrefix + branch] = parseRevision(line[:-1])
def run(self, args):
self.depotPath = ""
if self.importIntoRemotes:
self.refPrefix = "refs/remotes/p4/"
else:
- self.refPrefix = "refs/heads/p4/"
+ self.refPrefix = "refs/heads/"
createP4HeadRef = False;
- if self.syncWithOrigin and gitBranchExists("origin") and gitBranchExists(self.refPrefix + "master") and not self.detectBranches:
+ if self.syncWithOrigin and gitBranchExists("origin") and gitBranchExists(self.refPrefix + "master") and not self.detectBranches and self.importIntoRemotes:
### needs to be ported to multi branch import
print "Syncing with origin first as requested by calling git fetch origin"