From 15c0a2779af22d3263e90cfa9108f162a219b1d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D8=A3=D8=AD=D9=85=D8=AF=20=D8=A7=D9=84=D9=85=D8=AD=D9=85?= =?UTF-8?q?=D9=88=D8=AF=D9=8A=20=28Ahmed=20El-Mahmoudy=29?= Date: Fri, 24 Jan 2014 10:47:57 +0200 Subject: [PATCH] git-svn: Support / in commit field commit= is still supported --- fdroidserver/common.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 2cc1bf1f..27078ade 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -454,7 +454,16 @@ class vcs_gitsvn(vcs): else: # No tag found, normal svn rev translation # 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) git_rev = p.communicate()[0].rstrip() if p.returncode != 0 or not git_rev: