From: Daniel Martí Date: Mon, 3 Jun 2013 08:55:58 +0000 (+0200) Subject: Fix git-svn tags and checkouts X-Git-Tag: 0.1~556 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=c11464bdd5b2035f5acbe251543aa82119443565;p=fdroidserver.git Fix git-svn tags and checkouts --- 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):