##// END OF EJS Templates
Don't do git pull on remote repos since they are bare now, we need to use git fetch on them
marcink -
r2383:e576410f beta
parent child Browse files
Show More
@@ -500,6 +500,17 b' class GitRepository(BaseRepository):'
500 # If error occurs run_git_command raises RepositoryError already
500 # If error occurs run_git_command raises RepositoryError already
501 self.run_git_command(cmd)
501 self.run_git_command(cmd)
502
502
503 def fetch(self, url):
504 """
505 Tries to pull changes from external location.
506 """
507 url = self._get_url(url)
508 cmd = ['fetch']
509 cmd.append(url)
510 cmd = ' '.join(cmd)
511 # If error occurs run_git_command raises RepositoryError already
512 self.run_git_command(cmd)
513
503 @LazyProperty
514 @LazyProperty
504 def workdir(self):
515 def workdir(self):
505 """
516 """
@@ -360,8 +360,10 b' class ScmModel(BaseModel):'
360 # inject ui extra param to log this action via push logger
360 # inject ui extra param to log this action via push logger
361 for k, v in extras.items():
361 for k, v in extras.items():
362 repo._repo.ui.setconfig('rhodecode_extras', k, v)
362 repo._repo.ui.setconfig('rhodecode_extras', k, v)
363
363 if repo.alias == 'git':
364 repo.pull(clone_uri)
364 repo.fetch(clone_uri)
365 else:
366 repo.pull(clone_uri)
365 self.mark_for_invalidation(repo_name)
367 self.mark_for_invalidation(repo_name)
366 except:
368 except:
367 log.error(traceback.format_exc())
369 log.error(traceback.format_exc())
General Comments 0
You need to be logged in to leave comments. Login now