node: rename wdirnodes to clarify they are for manifest/filelogs
authorYuya Nishihara <yuya@tcha.org>
Sun, 25 Mar 2018 18:31:22 +0900
changeset 37448 d7114f883505
parent 37447 067e8d1178a2
child 37449 a0d71618074f
node: rename wdirnodes to clarify they are for manifest/filelogs Differential Revision: https://phab.mercurial-scm.org/D2941
mercurial/context.py
mercurial/copies.py
mercurial/node.py
--- a/mercurial/context.py	Sun Mar 25 18:27:43 2018 +0900
+++ b/mercurial/context.py	Sun Mar 25 18:31:22 2018 +0900
@@ -22,8 +22,8 @@
     nullid,
     nullrev,
     short,
+    wdirfilenodeids,
     wdirid,
-    wdirnodes,
     wdirrev,
 )
 from . import (
@@ -138,7 +138,7 @@
                 removed.append(fn)
             elif flag1 != flag2:
                 modified.append(fn)
-            elif node2 not in wdirnodes:
+            elif node2 not in wdirfilenodeids:
                 # 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
--- a/mercurial/copies.py	Sun Mar 25 18:27:43 2018 +0900
+++ b/mercurial/copies.py	Sun Mar 25 18:31:22 2018 +0900
@@ -280,7 +280,7 @@
         ac = repo.changelog.ancestors(revs, inclusive=True)
         ctx._ancestrycontext = ac
     def makectx(f, n):
-        if n in node.wdirnodes:  # in a working context?
+        if n in node.wdirfilenodeids:  # in a working context?
             if ctx.rev() is None:
                 return ctx.filectx(f)
             return repo[None][f]
--- a/mercurial/node.py	Sun Mar 25 18:27:43 2018 +0900
+++ b/mercurial/node.py	Sun Mar 25 18:31:22 2018 +0900
@@ -30,7 +30,7 @@
 addednodeid = ('0' * 15) + 'added'
 modifiednodeid = ('0' * 12) + 'modified'
 
-wdirnodes = {newnodeid, addednodeid, modifiednodeid}
+wdirfilenodeids = {newnodeid, addednodeid, modifiednodeid}
 
 # pseudo identifiers for working directory
 # (they are experimental, so don't add too many dependencies on them)