From f372e877cb32a6c009e29ff9ddf1a14f8b2fd216 Mon Sep 17 00:00:00 2001 From: Papoteur Date: Sat, 5 Nov 2016 15:38:08 +0100 Subject: Revert to 1.12.3 state --- MgaRepo/vcsutil.py | 29 ----------------------------- 1 file changed, 29 deletions(-) delete mode 100644 MgaRepo/vcsutil.py (limited to 'MgaRepo/vcsutil.py') diff --git a/MgaRepo/vcsutil.py b/MgaRepo/vcsutil.py deleted file mode 100644 index 91adade..0000000 --- a/MgaRepo/vcsutil.py +++ /dev/null @@ -1,29 +0,0 @@ -from MgaRepo import Error -from MgaRepo.git import GIT -from MgaRepo.svn import SVN -import os - -def detectVCS(url): - if ':' in url: - protocol,uri = url.split(":") - if "svn" in protocol: - return SVN(url=url) - elif "git" in protocol: - return GIT(url=url) - elif "http" in protocol: - if uri.endswith(".git"): - return GIT(url=url) - elif "svn" in uri: - return SVN(url=url) - raise Error("Unknown protocol %s for %s" % (protocol, url)) - elif os.path.exists(url) and os.path.isdir(url): - while True: - url = os.path.abspath(url) - for vcs in (SVN, GIT): - vcsdir = os.path.join(url, vcs.vcs_dirname) - if os.path.exists(vcsdir) and os.path.isdir(vcsdir): - return vcs(path=url) - url = os.path.dirname(url) - if url == "/": - break - raise Error("No supported repository found at path: %s" % url) -- cgit v1.2.1