changeset 37173:05ff1a155a21

memctx: create parent contexts using "repo[p]" syntax I want to reduce dependence on basectx.__new__() and move that code over to repo.__getitem__(). Differential Revision: https://phab.mercurial-scm.org/D2968
author Martin von Zweigbergk <martinvonz@google.com>
date Thu, 29 Mar 2018 22:22:51 -0700
parents daef13da66fe
children bb47dc2f71a0
files mercurial/context.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Thu Mar 29 21:29:15 2018 -0700
+++ b/mercurial/context.py	Thu Mar 29 22:22:51 2018 -0700
@@ -2284,7 +2284,7 @@
         self._node = None
         parents = [(p or nullid) for p in parents]
         p1, p2 = parents
-        self._parents = [changectx(self._repo, p) for p in (p1, p2)]
+        self._parents = [self._repo[p] for p in (p1, p2)]
         files = sorted(set(files))
         self._files = files
         if branch is not None: