Changeset - a228a33d868e
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 12 years ago 2013-05-20 13:04:34
marcin@python-works.com
Fake post-push actions when doing git fetch. It's still want show
what revisions we fetched but at least we trigger the action
1 file changed with 8 insertions and 0 deletions:
0 comments (0 inline, 0 general)
rhodecode/model/scm.py
Show inline comments
 
@@ -501,12 +501,20 @@ class ScmModel(BaseModel):
 

	
 
        repo = dbrepo.scm_instance
 
        repo_name = dbrepo.repo_name
 
        try:
 
            if repo.alias == 'git':
 
                repo.fetch(clone_uri)
 
                # git doesn't really have something like post-fetch action
 
                # we fake that now. #TODO: extract fetched revisions somehow
 
                # here
 
                self._handle_push(repo,
 
                                  username=username,
 
                                  action='push_remote',
 
                                  repo_name=repo_name,
 
                                  revisions=[])
 
            else:
 
                self._handle_rc_scm_extras(username, dbrepo.repo_name,
 
                                           repo.alias, action='push_remote')
 
                repo.pull(clone_uri)
 

	
 
            self.mark_for_invalidation(repo_name)
0 comments (0 inline, 0 general)