mirror of
https://github.com/frej/fast-export.git
synced 2026-01-22 06:02:03 +01:00
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>
This commit is contained in:
committed by
Simon Hausmann
parent
62d7323e48
commit
58739b4166
3
git-p4
3
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"
|
||||
|
||||
Reference in New Issue
Block a user