mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-04 22:40:12 +01:00
Indent properly, space the code a bit
This commit is contained in:
parent
15c0a2779a
commit
325cca0e37
@ -454,18 +454,21 @@ class vcs_gitsvn(vcs):
|
|||||||
else:
|
else:
|
||||||
# No tag found, normal svn rev translation
|
# No tag found, normal svn rev translation
|
||||||
# Translate svn rev into git format
|
# Translate svn rev into git format
|
||||||
rev_split=rev.split('/')
|
rev_split = rev.split('/')
|
||||||
if len(rev_split) > 1:
|
if len(rev_split) > 1:
|
||||||
treeish=rev_split[0]
|
treeish = rev_split[0]
|
||||||
svn_rev=rev_split[1]
|
svn_rev = rev_split[1]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# if no branch is specified, then assume trunk (ie. 'master'
|
# if no branch is specified, then assume trunk (ie. 'master'
|
||||||
# branch):
|
# branch):
|
||||||
treeish='master'
|
treeish = 'master'
|
||||||
svn_rev=rev
|
svn_rev = rev
|
||||||
|
|
||||||
p = subprocess.Popen(['git', 'svn', 'find-rev', 'r' + svn_rev, treeish],
|
p = subprocess.Popen(['git', 'svn', 'find-rev', 'r' + svn_rev, treeish],
|
||||||
cwd=self.local, stdout=subprocess.PIPE)
|
cwd=self.local, stdout=subprocess.PIPE)
|
||||||
git_rev = p.communicate()[0].rstrip()
|
git_rev = p.communicate()[0].rstrip()
|
||||||
|
|
||||||
if p.returncode != 0 or not git_rev:
|
if p.returncode != 0 or not git_rev:
|
||||||
# Try a plain git checkout as a last resort
|
# Try a plain git checkout as a last resort
|
||||||
p = subprocess.Popen(['git', 'checkout', rev], cwd=self.local,
|
p = subprocess.Popen(['git', 'checkout', rev], cwd=self.local,
|
||||||
@ -484,6 +487,7 @@ class vcs_gitsvn(vcs):
|
|||||||
print out
|
print out
|
||||||
else:
|
else:
|
||||||
raise VCSException("Git svn checkout failed")
|
raise VCSException("Git svn checkout failed")
|
||||||
|
|
||||||
# Get rid of any uncontrolled files left behind...
|
# Get rid of any uncontrolled files left behind...
|
||||||
if subprocess.call(['git', 'clean', '-dffx'], cwd=self.local) != 0:
|
if subprocess.call(['git', 'clean', '-dffx'], cwd=self.local) != 0:
|
||||||
raise VCSException("Git clean failed")
|
raise VCSException("Git clean failed")
|
||||||
|
Loading…
Reference in New Issue
Block a user