diff options
author | Simon Hausmann <simon@lst.de> | 2007-06-10 10:57:40 +0200 |
---|---|---|
committer | Simon Hausmann <simon@lst.de> | 2007-06-10 10:57:40 +0200 |
commit | cae7b732d859b06a4f560271099891f15c5700f6 (patch) | |
tree | 7313a3c42d085358b6902b6c2035812705d242db /contrib | |
parent | 7aded26ce870ba2998e276604fc3c18dad6133bd (diff) | |
download | git-cae7b732d859b06a4f560271099891f15c5700f6.tar.gz git-cae7b732d859b06a4f560271099891f15c5700f6.tar.xz |
Fix updating/creating remotes/p4/* heads from origin/p4/*
Signed-off-by: Simon Hausmann <simon@lst.de>
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/fast-import/git-p4 | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index d03ba0b6a..9d52eada4 100755 --- a/contrib/fast-import/git-p4 +++ b/contrib/fast-import/git-p4 @@ -960,14 +960,16 @@ class P4Sync(Command): print ("Creating/updating branch(es) in %s based on origin branch(es)" % self.refPrefix) + originPrefix = "origin/p4/" + for line in read_pipe_lines("git rev-parse --symbolic --remotes"): line = line.strip() - if (not line.startswith("origin/")) or line.endswith("HEAD"): + if (not line.startswith(originPrefix)) or line.endswith("HEAD"): continue - headName = line[len("origin/"):] + headName = line[len(originPrefix):] remoteHead = self.refPrefix + headName - originHead = "origin/" + headName + originHead = line original = extractSettingsGitLog(extractLogMessageFromGitCommit(originHead)) if (not original.has_key('depot-paths') @@ -1020,7 +1022,7 @@ class P4Sync(Command): # map from branch depot path to parent branch self.knownBranches = {} self.initialParents = {} - self.hasOrigin = gitBranchExists("origin") + self.hasOrigin = gitBranchExists("origin") or gitBranchExists("origin/p4") or gitBranchExists("origin/p4/master") if self.importIntoRemotes: self.refPrefix = "refs/remotes/p4/" |