# HG changeset patch # User Pierre-Yves David # Date 1429542965 -7200 # Node ID 7f9655f3716390df1484ebda60b38a2d191024b6 # Parent 0325c0da05df2589b68682e9d78c79219f32c007 pushkey: flush pending data before running a pre-pushkey hook (issue4607) The pre-pushkey hook will likely validate the pushkey based on element previously changed in the same transaction. We need to make theses data available for the hook. diff -r 0325c0da05df -r 7f9655f37163 mercurial/localrepo.py --- a/mercurial/localrepo.py Mon Apr 20 17:15:50 2015 +0200 +++ b/mercurial/localrepo.py Mon Apr 20 17:16:05 2015 +0200 @@ -1905,6 +1905,8 @@ hookargs = {} if tr is not None: hookargs.update(tr.hookargs) + pending = lambda: tr.writepending() and self.root or "" + hookargs['pending'] = pending hookargs['namespace'] = namespace hookargs['key'] = key hookargs['old'] = old