1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-04 22:40:12 +01:00

Better detection of git-svn find-rev failure

This commit is contained in:
Ciaran Gultnieks 2012-07-26 09:16:41 +01:00
parent 9606e6e4a8
commit 6eb2229a3b

View File

@ -173,7 +173,7 @@ class vcs_gitsvn(vcs):
p = subprocess.Popen(['git', 'svn', 'find-rev', 'r' + rev],
cwd=self.local, stdout=subprocess.PIPE)
rev = p.communicate()[0].rstrip()
if p.returncode != 0:
if p.returncode != 0 or len(rev) == 0:
raise VCSException("Failed to get git treeish from svn rev")
# Check out the appropriate revision...
if subprocess.call(['git', 'checkout', rev], cwd=self.local) != 0: