Mercurial > kallithea
comparison rhodecode/lib/hooks.py @ 2998:433428ffd13b beta
fixes #645 Fix git handler when doing delete remote branch
- journal will now display nicer labels for create tag, and delete branch operations for git
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sat, 10 Nov 2012 14:50:11 +0100 |
parents | 742d1b8ca263 |
children | db1b7125cdaf |
comparison
equal
deleted
inserted
replaced
2997:da3926d9e56e | 2998:433428ffd13b |
---|---|
410 heads = heads.replace(push_ref['ref'], '') | 410 heads = heads.replace(push_ref['ref'], '') |
411 heads = ' '.join(map(lambda c: c.strip('\n').strip(), | 411 heads = ' '.join(map(lambda c: c.strip('\n').strip(), |
412 heads.splitlines())) | 412 heads.splitlines())) |
413 cmd = (('log %(new_rev)s' % push_ref) + | 413 cmd = (('log %(new_rev)s' % push_ref) + |
414 ' --reverse --pretty=format:"%H" --not ' + heads) | 414 ' --reverse --pretty=format:"%H" --not ' + heads) |
415 git_revs += repo.run_git_command(cmd)[0].splitlines() | |
416 | |
417 elif push_ref['new_rev'] == EmptyChangeset().raw_id: | |
418 #delete branch case | |
419 git_revs += ['delete_branch=>%s' % push_ref['name']] | |
415 else: | 420 else: |
416 cmd = (('log %(old_rev)s..%(new_rev)s' % push_ref) + | 421 cmd = (('log %(old_rev)s..%(new_rev)s' % push_ref) + |
417 ' --reverse --pretty=format:"%H"') | 422 ' --reverse --pretty=format:"%H"') |
418 git_revs += repo.run_git_command(cmd)[0].splitlines() | 423 git_revs += repo.run_git_command(cmd)[0].splitlines() |
424 | |
419 elif _type == 'tags': | 425 elif _type == 'tags': |
420 git_revs += [push_ref['name']] | 426 git_revs += ['tag=>%s' % push_ref['name']] |
421 | 427 |
422 log_push_action(baseui, repo, _git_revs=git_revs) | 428 log_push_action(baseui, repo, _git_revs=git_revs) |