Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Fix updating/creating remotes/p4/* heads from origin/p4/*
author
Simon Hausmann
<simon@lst.de>
Sun, 10 Jun 2007 08:57:40 +0000
(10:57 +0200)
committer
Simon Hausmann
<simon@lst.de>
Sun, 10 Jun 2007 08:57:40 +0000
(10:57 +0200)
Signed-off-by: Simon Hausmann <simon@lst.de>
contrib/fast-import/git-p4
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
7aded26
)
diff --git
a/contrib/fast-import/git-p4
b/contrib/fast-import/git-p4
index d03ba0b6ad4c570e33d45538ee9e3ec84d18c4ef..9d52eada425424f1dedcd8704128067fcc5412dc 100755
(executable)
--- 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)
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()
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
continue
- headName = line[len(
"origin/"
):]
+ headName = line[len(
originPrefix
):]
remoteHead = self.refPrefix + headName
remoteHead = self.refPrefix + headName
- originHead =
"origin/" + headNam
e
+ originHead =
lin
e
original = extractSettingsGitLog(extractLogMessageFromGitCommit(originHead))
if (not original.has_key('depot-paths')
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 = {}
# 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/"
if self.importIntoRemotes:
self.refPrefix = "refs/remotes/p4/"