chiark / gitweb /
Better detection of git-svn find-rev failure
authorCiaran Gultnieks <ciaran@ciarang.com>
Thu, 26 Jul 2012 08:16:41 +0000 (09:16 +0100)
committerCiaran Gultnieks <ciaran@ciarang.com>
Thu, 26 Jul 2012 08:16:41 +0000 (09:16 +0100)
fdroidserver/common.py

index 06f1b94f98a78d7ec77c2eb38965bb616e2b25a4..37caf6fcacc7c6434671cac0bba8c77156dbcdbd 100644 (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: