writeback = False
else:
deleterepo = True
- logging.info("Repository details changed - deleting")
+ logging.info(
+ "Repository details for {0} changed - deleting"
+ .format(self.local))
else:
deleterepo = True
logging.info("Repository details missing - deleting")
if p.returncode != 0:
raise VCSException("Git fetch failed")
self.refreshed = True
- # Check out the appropriate revision
- rev = str(rev if rev else 'origin/master')
+ # origin/HEAD is the HEAD of the remote, e.g. the "default branch" on
+ # a github repo. Most of the time this is the same as origin/master.
+ rev = str(rev if rev else 'origin/HEAD')
p = SilentPopen(['git', 'checkout', '-f', rev], cwd=self.local)
if p.returncode != 0:
raise VCSException("Git checkout failed")
def latesttags(self, alltags, number):
self.checkrepo()
- p = SilentPopen(['echo "' + '\n'.join(alltags) + '" | \
- xargs -I@ git log --format=format:"%at @%n" -1 @ | \
- sort -n | awk \'{print $2}\''],
+ p = SilentPopen(['echo "' + '\n'.join(alltags) + '" | '
+ + 'xargs -I@ git log --format=format:"%at @%n" -1 @ | '
+ + 'sort -n | awk \'{print $2}\''],
cwd=self.local, shell=True)
return p.stdout.splitlines()[-number:]