aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MgaRepo/git.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/MgaRepo/git.py b/MgaRepo/git.py
index 01a1272..c027079 100644
--- a/MgaRepo/git.py
+++ b/MgaRepo/git.py
@@ -1,7 +1,8 @@
from MgaRepo import Error, config
from MgaRepo.util import execcmd
from MgaRepo.VCS import *
-from os.path import basename, dirname, abspath
+from MgaRepo.svn import SVN
+from os.path import basename, dirname, abspath, lexists, join
from os import chdir, getcwd
import sys
import re
@@ -23,6 +24,8 @@ class GIT(VCS):
self.env_defaults = {"GIT_SSH": self.vcs_wrapper}
def clone(self, url, targetpath, **kwargs):
+ if lexists(join(targetpath, SVN.vcs_dirname)):
+ raise Error("Target path %s already contains svn checkout, aborting...")
if url.split(':')[0].find("svn") < 0:
return VCS.clone(self, url, **kwargs)
else: