Changeset - e576410f911d
[Not reviewed]
beta
0 2 0
Marcin Kuzminski - 13 years ago 2012-06-04 03:55:28
marcin@python-works.com
Don't do git pull on remote repos since they are bare now, we need to use git fetch on them
2 files changed with 15 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/vcs/backends/git/repository.py
Show inline comments
 
@@ -500,6 +500,17 @@ class GitRepository(BaseRepository):
 
        # If error occurs run_git_command raises RepositoryError already
 
        self.run_git_command(cmd)
 

	
 
    def fetch(self, url):
 
        """
 
        Tries to pull changes from external location.
 
        """
 
        url = self._get_url(url)
 
        cmd = ['fetch']
 
        cmd.append(url)
 
        cmd = ' '.join(cmd)
 
        # If error occurs run_git_command raises RepositoryError already
 
        self.run_git_command(cmd)
 

	
 
    @LazyProperty
 
    def workdir(self):
 
        """
rhodecode/model/scm.py
Show inline comments
 
@@ -360,8 +360,10 @@ class ScmModel(BaseModel):
 
            # inject ui extra param to log this action via push logger
 
            for k, v in extras.items():
 
                repo._repo.ui.setconfig('rhodecode_extras', k, v)
 

	
 
            repo.pull(clone_uri)
 
            if repo.alias == 'git':
 
                repo.fetch(clone_uri)
 
            else:
 
                repo.pull(clone_uri)
 
            self.mark_for_invalidation(repo_name)
 
        except:
 
            log.error(traceback.format_exc())
0 comments (0 inline, 0 general)