Mercurial > kallithea
changeset 2408:89875fb6739a beta
fixed issue with git-hook when pushing new heads
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Wed, 06 Jun 2012 23:31:52 +0200 |
parents | 8a68e0292232 |
children | 761e00380370 |
files | rhodecode/lib/hooks.py |
diffstat | 1 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/rhodecode/lib/hooks.py Wed Jun 06 22:23:27 2012 +0200 +++ b/rhodecode/lib/hooks.py Wed Jun 06 23:31:52 2012 +0200 @@ -249,9 +249,13 @@ 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)