From c11464bdd5b2035f5acbe251543aa82119443565 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 3 Jun 2013 10:55:58 +0200 Subject: [PATCH] Fix git-svn tags and checkouts --- fdroidserver/common.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/fdroidserver/common.py b/fdroidserver/common.py index d3b73621..f25c3d98 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -245,13 +245,13 @@ class vcs_gitsvn(vcs): # Translate svn rev into git format p = subprocess.Popen(['git', 'svn', 'find-rev', 'r' + rev], cwd=self.local, stdout=subprocess.PIPE) - rev = p.communicate()[0].rstrip() - if p.returncode != 0 or len(rev) == 0: + git_rev = p.communicate()[0].rstrip() + if p.returncode != 0 or len(git_rev) == 0: # Try a plain git checkout as a last resort if subprocess.call(['git', 'checkout', rev], cwd=self.local) != 0: raise VCSException("No git treeish found and direct git checkout failed") # Check out the appropriate git revision... - if subprocess.call(['git', 'checkout', rev], cwd=self.local) != 0: + if subprocess.call(['git', 'checkout', git_rev], cwd=self.local) != 0: raise VCSException("Git checkout failed") # Get rid of any uncontrolled files left behind... if subprocess.call(['git', 'clean', '-dffx'], cwd=self.local) != 0: @@ -259,7 +259,7 @@ class vcs_gitsvn(vcs): def gettags(self): self.checkrepo() - return os.listdir(os.path.join(self.local, '/.git/svn/refs/remotes/tags')) + return os.listdir(os.path.join(self.local, '.git/svn/refs/remotes/tags')) class vcs_svn(vcs):