summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c208a24)
raw | patch | inline | side by side (parent: c208a24)
author | Simon Hausmann <simon@lst.de> | |
Sun, 26 Aug 2007 14:44:55 +0000 (16:44 +0200) | ||
committer | Simon Hausmann <simon@lst.de> | |
Mon, 3 Sep 2007 18:35:37 +0000 (20:35 +0200) |
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4 | patch | blob | history |
index 2c67190ffc49c46199a137071584526e6a4602ed..406bec1a290ff4b83bc349afaa75201cdf6fffc0 100755 (executable)
self.keepRepoPath = (d.has_key('options')
and ('keepRepoPath' in d['options']))
+ def gitRefForBranch(self, branch):
+ if branch == "main":
+ return self.refPrefix + "master"
+
+ if len(branch) <= 0:
+ return branch
+
+ return self.refPrefix + self.projectName + branch
+
def importChanges(self, changes):
cnt = 1
for change in changes:
elif self.verbose:
print "parent determined through known branches: %s" % parent
- # main branch? use master
- if branch == "main":
- branch = "master"
- else:
-
- ## FIXME
- branch = self.projectName + branch
-
- if parent == "main":
- parent = "master"
- elif len(parent) > 0:
- ## FIXME
- parent = self.projectName + parent
-
- branch = self.refPrefix + branch
- if len(parent) > 0:
- parent = self.refPrefix + parent
+ branch = self.gitRefForBranch(branch)
+ parent = self.gitRefForBranch(parent)
if self.verbose:
print "looking for initial parent for %s; current parent is %s" % (branch, parent)