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:
authorKevin Green <Kevin.Green@morganstanley.com>2007-06-12 00:48:07 +0400
committerSimon Hausmann <simon@lst.de>2007-06-12 01:15:38 +0400
commitc3bf3f1301319faab7344e2d8b5ab10a3d648856 (patch)
tree552dbeb5aa2c4df608a94f61c7aec2a8c002549c /contrib/fast-import
parent6581de096e8323385b8ec7d467e91927a80ce3b9 (diff)
git-p4: check for existence of repo dir before trying to create
When using git-p4 in this manner: git-p4 clone //depot/path/project myproject If "myproject" already exists as a dir, but not a valid git repo, it fails to create the directory. Signed-off-by: Kevin Green <Kevin.Green@morganstanley.com>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-xcontrib/fast-import/git-p43
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index e380c149b4..cababc7fc8 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1400,7 +1400,8 @@ class P4Clone(P4Sync):
self.cloneDestination = self.defaultDestination(args)
print "Importing from %s into %s" % (', '.join(depotPaths), self.cloneDestination)
- os.makedirs(self.cloneDestination)
+ if not os.path.exists(self.cloneDestination):
+ os.makedirs(self.cloneDestination)
os.chdir(self.cloneDestination)
system("git init")
self.gitdir = os.getcwd() + "/.git"