mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 23:42:37 +03:00
Support origin/ checkouts with tags as well in gitsvn
This commit is contained in:
parent
a4cdd92448
commit
f857169317
1 changed files with 7 additions and 2 deletions
|
@ -617,7 +617,11 @@ class vcs_gitsvn(vcs):
|
||||||
if rev:
|
if rev:
|
||||||
nospaces_rev = rev.replace(' ', '%20')
|
nospaces_rev = rev.replace(' ', '%20')
|
||||||
# Try finding a svn tag
|
# Try finding a svn tag
|
||||||
p = SilentPopen(['git', 'checkout', 'tags/' + nospaces_rev], cwd=self.local)
|
for treeish in ['origin/', '']:
|
||||||
|
p = SilentPopen(['git', 'checkout', treeish + 'tags/' + nospaces_rev],
|
||||||
|
cwd=self.local)
|
||||||
|
if p.returncode == 0:
|
||||||
|
break
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
# 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
|
||||||
|
@ -634,7 +638,8 @@ class vcs_gitsvn(vcs):
|
||||||
treeish += 'master'
|
treeish += 'master'
|
||||||
svn_rev = rev
|
svn_rev = rev
|
||||||
|
|
||||||
p = SilentPopen(['git', 'svn', 'find-rev', 'r' + svn_rev, treeish], cwd=self.local)
|
p = SilentPopen(['git', 'svn', 'find-rev', 'r' + svn_rev, treeish],
|
||||||
|
cwd=self.local)
|
||||||
git_rev = p.output.rstrip()
|
git_rev = p.output.rstrip()
|
||||||
|
|
||||||
if p.returncode == 0 and git_rev:
|
if p.returncode == 0 and git_rev:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue