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], p = subprocess.Popen(['git', 'svn', 'find-rev', 'r' + rev],
cwd=self.local, stdout=subprocess.PIPE) cwd=self.local, stdout=subprocess.PIPE)
rev = p.communicate()[0].rstrip() 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") raise VCSException("Failed to get git treeish from svn rev")
# Check out the appropriate revision... # Check out the appropriate revision...
if subprocess.call(['git', 'checkout', rev], cwd=self.local) != 0: if subprocess.call(['git', 'checkout', rev], cwd=self.local) != 0: