Thread (28 messages) flat view 28 messages, 3 authors, 2016-06-15
STALE3740d

[PATCH 01/21] git p4: temp branch name should use / even on windows

From: Pete Wyckoff <hidden>
Date: 2016-06-15 22:54:53
Subsystem: the rest · Maintainer: Linus Torvalds

Commit fed2369 (git-p4: Search for parent commit on branch creation,
2012-01-25) uses temporary branches to help find the parent of a
new p4 branch.  The temp branches are of the form "git-p4-tmp/%d"
for some p4 change number.  Mistakenly, this string was made
using os.path.join() instead of just string concatenation.  On
windows, this turns into a backslash (\), which is not allowed in
git branch names.

Signed-off-by: Pete Wyckoff <redacted>
---
 git-p4.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/git-p4.py b/git-p4.py
index 882b1bb..1e7a22a 100755
--- a/git-p4.py
+++ b/git-p4.py
@@ -2599,7 +2599,7 @@ class P4Sync(Command, P4UserMap):
 
                         blob = None
                         if len(parent) > 0:
-                            tempBranch = os.path.join(self.tempBranchLocation, "%d" % (change))
+                            tempBranch = "%s/%d" % (self.tempBranchLocation, change)
                             if self.verbose:
                                 print "Creating temporary branch: " + tempBranch
                             self.commit(description, filesForCommit, tempBranch)
-- 
1.7.12.1.403.g28165e1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help