Skip to content

Commit 0591cfa

Browse files
ggibbonsgitster
authored andcommitted
git-p4: ensure submit clientPath exists before chdir
Submitting patches back to p4 requires a p4 "client". This is a mapping from server depot paths into a local directory. The directory need not exist or be populated with files; only the mapping on the server is required. When there is no directory, make git-p4 automatically create it. [ reword description --pw ] Signed-off-by: Gary Gibbons <[email protected]> Signed-off-by: Pete Wyckoff <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9859a02 commit 0591cfa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

contrib/fast-import/git-p4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1116,6 +1116,10 @@ class P4Submit(Command, P4UserMap):
11161116
print "Perforce checkout for depot path %s located at %s" % (self.depotPath, self.clientPath)
11171117
self.oldWorkingDirectory = os.getcwd()
11181118

1119+
# ensure the clientPath exists
1120+
if not os.path.exists(self.clientPath):
1121+
os.makedirs(self.clientPath)
1122+
11191123
chdir(self.clientPath)
11201124
print "Synchronizing p4 checkout..."
11211125
p4_sync("...")

0 commit comments

Comments
 (0)