Patchwork D2941: node: rename wdirnodes to clarify they are for manifest/filelogs

login
register
mail settings
Submitter phabricator
Date March 25, 2018, 9:54 a.m.
Message ID <differential-rev-PHID-DREV-fsugo2ronhhara64y4ur-req@phab.mercurial-scm.org>
Download mbox | patch
Permalink /patch/29847/
State Superseded
Headers show

Comments

phabricator - March 25, 2018, 9:54 a.m.
yuja created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D2941

AFFECTED FILES
  mercurial/context.py
  mercurial/copies.py
  mercurial/node.py

CHANGE DETAILS




To: yuja, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/node.py b/mercurial/node.py
--- a/mercurial/node.py
+++ b/mercurial/node.py
@@ -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)
diff --git a/mercurial/copies.py b/mercurial/copies.py
--- a/mercurial/copies.py
+++ b/mercurial/copies.py
@@ -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]
diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -22,8 +22,8 @@ 
     nullid,
     nullrev,
     short,
+    wdirfilenodeids,
     wdirid,
-    wdirnodes,
     wdirrev,
 )
 from . import (
@@ -147,7 +147,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