[PATCH 1 of 2 STABLE] hooks: always include HG_PENDING

Durham Goode durham at fb.com
Wed Nov 4 23:00:30 CST 2015



On 11/4/15 5:11 PM, Durham Goode wrote:
>
>
> On 11/4/15 4:26 PM, FUJIWARA Katsunori wrote:
>> At Tue, 3 Nov 2015 17:19:37 -0800,
>> Durham Goode wrote:
>>> # HG changeset patch
>>> # User Durham Goode <durham at fb.com>
>>> # Date 1446598693 28800
>>> #      Tue Nov 03 16:58:13 2015 -0800
>>> # Branch stable
>>> # Node ID 0a772553285d61aeea3226f74698223b09fae7ac
>>> # Parent  58b7f3e93bbab749ab16c09df12aae5ba7880708
>>> hooks: always include HG_PENDING
>>>
>>> Previously we would only include HG_PENDING in the hook args if the
>>> transaction's writepending() actually wrote something. This is a bad 
>>> criteria,
>>> since it's possible that a previous call to writepending() wrote 
>>> stuff and the
>>> hooks want to still see that.
>>>
>>> The solution is to always have hooks execute within the scope of the 
>>> pending
>>> changes by always putting HG_PENDING in the environment.
Matt and foozy, on a related topic:

The change to unify the HG_PENDING stuff to hooks._exthook() also means 
that tr.writepending() is not called and HG_PENDING is not set for 
python hooks. This broke one of our python hooks which drives our other 
hooks.  Matt, I know the python hook api provides no guarantees, but 
this could break any other python hooks that shell out.  So just fyi at 
the very least.


More information about the Mercurial-devel mailing list