mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 15:32:30 +03:00
git-svn: Support <branch>/<rev> in commit field
commit=<rev> is still supported
This commit is contained in:
parent
d6dbad65c6
commit
15c0a2779a
1 changed files with 10 additions and 1 deletions
|
@ -454,7 +454,16 @@ 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
|
||||||
p = subprocess.Popen(['git', 'svn', 'find-rev', 'r' + rev],
|
rev_split=rev.split('/')
|
||||||
|
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)
|
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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue