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

login
register
mail settings
Submitter phabricator
Date April 7, 2018, 1:54 a.m.
Message ID <d9979d00b534136800ac111cf1d47aab@localhost.localdomain>
Download mbox | patch
Permalink /patch/30513/
State Not Applicable
Headers show

Comments

phabricator - April 7, 2018, 1:54 a.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd7114f883505: node: rename wdirnodes to clarify they are for manifest/filelogs (authored by yuja, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2941?vs=7282&id=7854

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, durin42
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 (
@@ -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