From: Ciaran Gultnieks Date: Fri, 20 Jan 2012 23:13:14 +0000 (+0000) Subject: Better git handling, particularly if the master branch disappears X-Git-Tag: 0.1~1085 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=0121c70763883891ffe185f7fd2acb6f6aa03f46;p=fdroidserver.git Better git handling, particularly if the master branch disappears --- diff --git a/common.py b/common.py index 8070373c..949c51a2 100644 --- a/common.py +++ b/common.py @@ -76,6 +76,8 @@ class vcs: assert False # Must be defined in child # Get new commits from the remote repository. Local must be clean. + # Fetch would really be a better name, as this doesn't necessarily + # (depending on the vcs) affect the local source tree or HEAD! def pull(self): assert False # Must be defined in child @@ -109,11 +111,8 @@ class vcs_git(vcs): def pull(self): self.checkrepo() - if subprocess.call(['git', 'pull', 'origin'], - cwd=self.local) != 0: - raise VCSException("Git pull failed") # Might need tags that aren't on a branch. - if subprocess.call(['git', 'fetch', '--tags', 'origin'], + if subprocess.call(['git', 'fetch', '--all', '--tags', 'origin'], cwd=self.local) != 0: raise VCSException("Git fetch failed")