Patchwork D7801: overlwayworkingctx: remove doubly bad reference to wrapped ctx for copies

login
register
mail settings
Submitter phabricator
Date Jan. 7, 2020, 12:59 a.m.
Message ID <differential-rev-PHID-DREV-zwoeumnwgxgb7wlolsug-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/44164/
State Superseded
Headers show

Comments

phabricator - Jan. 7, 2020, 12:59 a.m.
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  `_wrappedctx` lives on overlwayworkingctx, not on the repo object, so
  we should access it as `._wrappedctx`, not `._repo._wrappedctx`. More
  importantly, the overlayworkingctx is relative to its base, not
  including it, so the copies returned should not include copies made in
  the base.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




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

Patch

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -2218,7 +2218,7 @@ 
         ]
 
     def p1copies(self):
-        copies = self._repo._wrappedctx.p1copies().copy()
+        copies = {}
         narrowmatch = self._repo.narrowmatch()
         for f in self._cache.keys():
             if not narrowmatch(f):
@@ -2230,7 +2230,7 @@ 
         return copies
 
     def p2copies(self):
-        copies = self._repo._wrappedctx.p2copies().copy()
+        copies = {}
         narrowmatch = self._repo.narrowmatch()
         for f in self._cache.keys():
             if not narrowmatch(f):