1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-09-17 10:40:12 +02:00

Indent properly, space the code a bit

This commit is contained in:
Daniel Martí 2014-01-24 10:10:40 +01:00
parent 15c0a2779a
commit 325cca0e37

View File

@ -458,14 +458,17 @@ class vcs_gitsvn(vcs):
if len(rev_split) > 1:
treeish = rev_split[0]
svn_rev = rev_split[1]
else:
# if no branch is specified, then assume trunk (ie. 'master'
# branch):
treeish = 'master'
svn_rev = rev
p = subprocess.Popen(['git', 'svn', 'find-rev', 'r' + svn_rev, treeish],
cwd=self.local, stdout=subprocess.PIPE)
git_rev = p.communicate()[0].rstrip()
if p.returncode != 0 or not git_rev:
# Try a plain git checkout as a last resort
p = subprocess.Popen(['git', 'checkout', rev], cwd=self.local,
@ -484,6 +487,7 @@ class vcs_gitsvn(vcs):
print out
else:
raise VCSException("Git svn checkout failed")
# Get rid of any uncontrolled files left behind...
if subprocess.call(['git', 'clean', '-dffx'], cwd=self.local) != 0:
raise VCSException("Git clean failed")