else:
return None
-def _update_gitproject(localdir, gitpath=None, bare=False):
+def _update_gitproject(localdir, gitpath=None):
"""Fetch latest code to local dir"""
print '\nUpdating local git: %s' % localdir
try:
localgit = Git(localdir)
- if not bare:
+ if not localgit.bare:
localgit.pull(repo=gitpath, all_repos=True)
localgit.fetch(repo=gitpath, tags=True, all_remotes=True)
except GitRepositoryError, gre:
# fetch latest code if local dir already exists
if os.path.isdir(localdir) and \
- _update_gitproject(localdir, gitpath="%s/%s" %(giturl,gerritprj),
- bare=bare):
+ _update_gitproject(localdir, gitpath="%s/%s" %(giturl,gerritprj)):
return True
try: