Mercurial > hg > mercurial-crew
comparison mercurial/changegroup.py @ 21152:30bce7e60140
changegroup: use tr.hookargs when calling pretxnchangegroup hooks
So that other parties using the transaction can put information in our hook
calls.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Thu, 17 Apr 2014 17:15:02 -0400 |
parents | 240d340fe152 |
children | 53ee02b54e53 |
comparison
equal
deleted
inserted
replaced
21151:240d340fe152 | 21152:30bce7e60140 |
---|---|
673 | 673 |
674 if changesets > 0: | 674 if changesets > 0: |
675 p = lambda: cl.writepending() and repo.root or "" | 675 p = lambda: cl.writepending() and repo.root or "" |
676 if 'node' not in tr.hookargs: | 676 if 'node' not in tr.hookargs: |
677 tr.hookargs['node'] = hex(cl.node(clstart)) | 677 tr.hookargs['node'] = hex(cl.node(clstart)) |
678 repo.hook('pretxnchangegroup', throw=True, | 678 repo.hook('pretxnchangegroup', throw=True, source=srctype, |
679 node=hex(cl.node(clstart)), source=srctype, | 679 url=url, pending=p, **tr.hookargs) |
680 url=url, pending=p) | |
681 | 680 |
682 added = [cl.node(r) for r in xrange(clstart, clend)] | 681 added = [cl.node(r) for r in xrange(clstart, clend)] |
683 publishing = repo.ui.configbool('phases', 'publish', True) | 682 publishing = repo.ui.configbool('phases', 'publish', True) |
684 if srctype in ('push', 'serve'): | 683 if srctype in ('push', 'serve'): |
685 # Old servers can not push the boundary themselves. | 684 # Old servers can not push the boundary themselves. |