summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7880019)
raw | patch | inline | side by side (parent: 7880019)
author | Simon Hausmann <simon@lst.de> | |
Wed, 18 Jul 2007 08:56:31 +0000 (10:56 +0200) | ||
committer | Simon Hausmann <simon@lst.de> | |
Wed, 18 Jul 2007 15:29:05 +0000 (17:29 +0200) |
Signed-off-by: Simon Hausmann <simon@lst.de>
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
contrib/fast-import/git-p4 | patch | blob | history |
index 54053e3f3d404567ce4b5734b2c7e94cdf666645..d4a2f14311c83898dffac29f541a2be093085fd3 100755 (executable)
def gitConfig(key):
return read_pipe("git config %s" % key, ignore_error=True).strip()
+def p4BranchesInGit(branchesAreInRemotes = True):
+ branches = {}
+
+ cmdline = "git rev-parse --symbolic "
+ if branchesAreInRemotes:
+ cmdline += " --remotes"
+ else:
+ cmdline += " --branches"
+
+ for line in read_pipe_lines(cmdline):
+ line = line.strip()
+
+ ## only import to p4/
+ if not line.startswith('p4/') or line == "p4/HEAD":
+ continue
+ branch = line
+
+ # strip off p4
+ branch = re.sub ("^p4/", "", line)
+
+ branches[branch] = parseRevision(line)
+ return branches
+
def findUpstreamBranchPoint(head = "HEAD"):
settings = None
branchPoint = ""