Changeset - 89875fb6739a
[Not reviewed]
beta
0 1 0
Marcin Kuzminski - 13 years ago 2012-06-06 23:31:52
marcin@python-works.com
fixed issue with git-hook when pushing new heads
1 file changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/lib/hooks.py
Show inline comments
 
@@ -249,9 +249,13 @@ def handle_git_post_receive(repo_path, r
 
            cmd = "for-each-ref --format='%(refname)' 'refs/heads/*'"
 
            heads = repo.run_git_command(cmd)[0]
 
            heads = heads.replace(ref, '')
 
            cmd = 'log ' + new_rev + ' --reverse --pretty=format:"%H" --not ' + heads
 
            heads = ' '.join(map(lambda c: c.strip('\n').strip(),
 
                                 heads.splitlines()))
 
            cmd = ('log ' + new_rev +
 
                   ' --reverse --pretty=format:"%H" --not ' + heads)
 
        else:
 
            cmd = 'log ' + old_rev + '..' + new_rev + ' --reverse --pretty=format:"%H"'
 
            cmd = ('log ' + old_rev + '..' + new_rev +
 
                   ' --reverse --pretty=format:"%H"')
 
        git_revs = repo.run_git_command(cmd)[0].splitlines()
 

	
 
        log_push_action(baseui, repo, _git_revs=git_revs)
0 comments (0 inline, 0 general)