Mercurial > hg
changeset 31258:c414e339e7af
status: handle more node indicators in buildstatus
There are several different node markers that indicate different working copy
states. The context._buildstatus function was only handling one of them, and
this patch makes it handle all of them (falling back to file content comparisons
when in one of these states).
This affects a future patch where we get rid of context._manifestmatches as part
of getting rid of manifest.matches(). context._manifestmatches is currently
hacky in that it uses the newnodeid for all added and modified files, which is
why the current newnodeid check is sufficient. When we get rid of this function
and use the normal manifest.diff function, we start to see the other indicators
in the nodes, so they need to be handled or else the tests fail.
author | Durham Goode <durham@fb.com> |
---|---|
date | Tue, 07 Mar 2017 09:56:11 -0800 |
parents | 11831d755b51 |
children | 6a9d0d24fdb4 |
files | mercurial/context.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Tue Mar 07 18:38:20 2017 -0800 +++ b/mercurial/context.py Tue Mar 07 09:56:11 2017 -0800 @@ -23,6 +23,7 @@ nullrev, short, wdirid, + wdirnodes, ) from . import ( encoding, @@ -140,7 +141,7 @@ removed.append(fn) elif flag1 != flag2: modified.append(fn) - elif node2 != newnodeid: + elif node2 not in wdirnodes: # When comparing files between two commits, we save time by # not comparing the file contents when the nodeids differ. # Note that this means we incorrectly report a reverted change