[PATCH 1 of 2 v3] context: stop setting None for modified or added nodes

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Dec 16 18:32:16 CST 2014



On 12/15/2014 11:14 AM, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie at google.com>
> # Date 1418416194 18000
> #      Fri Dec 12 15:29:54 2014 -0500
> # Node ID b7772da447df306ddfad854d7acd6b72bb5d5534
> # Parent  65c854f92d6ba8861414ff3191182fba28777a82
> context: stop setting None for modified or added nodes
>
> Instead use a modified nullid, so that we can identify modified or
> added nodes correctly when using manifest.diff().
>
> Thanks to Martin von Zweigbergk for catching that we have to update
> _buildstatus as well. That part eluded my debugging for some time.

So, as far as I understand that patch:

- None was a magic value (in _manifestmatch)
- None is used by something else for another magic value (in manifest.diff)
- Having them both equal creates issue, so we change the value of the 
_manifestmatch
- The content of the new magic value is absolution arbitrary.

If I got this write:

- We should improve the documentation around the initialization and 
usage of this new magic value.
- Using nullid confused me a bit, if you have no specific good semantic 
to use nullid we should probably use something else. (not sure what our 
constraint are)

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list