# HG changeset patch # User Martin von Zweigbergk # Date 2019-12-27 22:08:02 # Node ID f652b7ddc1d49ff1b2a47632666812b6b32eb7e7 # Parent 0750cbffdb3b4107c8054cad0d64bd1590392f37 overlwayworkingctx: remove doubly bad reference to wrapped ctx for copies `_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. Differential Revision: https://phab.mercurial-scm.org/D7801 diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -2224,7 +2224,7 @@ class overlayworkingctx(committablectx): ] def p1copies(self): - copies = self._repo._wrappedctx.p1copies().copy() + copies = {} narrowmatch = self._repo.narrowmatch() for f in self._cache.keys(): if not narrowmatch(f): @@ -2236,7 +2236,7 @@ class overlayworkingctx(committablectx): 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):