Code

git-p4: ensure submit clientPath exists before chdir
[git.git] / contrib / fast-import / git-p4
index 7fd8bf031e1eb10f6dda2342f32c86454ef7efb3..122b7c28640deb56bd2f8df99c960d415fab64ac 100755 (executable)
@@ -1116,6 +1116,10 @@ class P4Submit(Command, P4UserMap):
         print "Perforce checkout for depot path %s located at %s" % (self.depotPath, self.clientPath)
         self.oldWorkingDirectory = os.getcwd()
 
+        # ensure the clientPath exists
+        if not os.path.exists(self.clientPath):
+            os.makedirs(self.clientPath)
+
         chdir(self.clientPath)
         print "Synchronizing p4 checkout..."
         p4_sync("...")