print '\nUpdating local git: %s' % localdir
try:
localgit = Git(localdir)
- if not localgit.bare:
- localgit.pull(repo=gitpath, all_repos=True)
if gitpath and localgit.get_remote_repos().get('origin')[0] != gitpath:
os.system('git --git-dir=%s remote set-url origin %s' % ([localdir,
os.path.join(localdir, '.git')][localgit.bare], gitpath))
- localgit.fetch(all_remotes=True)
+ if localgit.bare:
+ localgit.fetch(all_remotes=True)
+ else:
+ localgit.fetch(tags=True)
+ localgit.pull()
except GitRepositoryError, gre:
print('git execption: ', gre)
shutil.rmtree(localdir)