diff -r 673f0fdc1046 -r 0298a07f64d9 mercurial/context.py --- a/mercurial/context.py Mon Nov 07 18:57:54 2016 -0800 +++ b/mercurial/context.py Thu Nov 10 02:17:22 2016 -0800 @@ -16,6 +16,7 @@ from .node import ( bin, hex, + newnodeid, nullid, nullrev, short, @@ -39,11 +40,6 @@ propertycache = util.propertycache -# Phony node value to stand-in for new files in some uses of -# manifests. Manifests support 21-byte hashes for nodes which are -# dirty in the working copy. -_newnode = '!' * 21 - nonascii = re.compile(r'[^\x21-\x7f]').search class basectx(object): @@ -142,7 +138,7 @@ removed.append(fn) elif flag1 != flag2: modified.append(fn) - elif node2 != _newnode: + elif node2 != newnodeid: # 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 @@ -1587,7 +1583,7 @@ """ mf = self._repo['.']._manifestmatches(match, s) for f in s.modified + s.added: - mf[f] = _newnode + mf[f] = newnodeid mf.setflag(f, self.flags(f)) for f in s.removed: if f in mf: