Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGary Gibbons <ggibbons@perforce.com>2011-12-10 03:48:14 +0400
committerJunio C Hamano <gitster@pobox.com>2011-12-12 09:12:55 +0400
commit0591cfa8d89aa63eaaaab3fdd5ba458f408fe4cb (patch)
tree99894313cbf835b9c7992c39d876acae650453e7 /contrib/fast-import
parent9859a023fef30ffebdd22ad9639c587ac720b8b6 (diff)
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 <ggibbons@perforce.com> Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-xcontrib/fast-import/git-p44
1 files changed, 4 insertions, 0 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index 7fd8bf031e..122b7c2864 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -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("...")