# HG changeset patch # User Martin von Zweigbergk # Date 1522387371 25200 # Node ID 05ff1a155a219dc3f8f142c9d2618f027f68f028 # Parent daef13da66feff03ad7e25c6ed3260b160008da1 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 diff -r daef13da66fe -r 05ff1a155a21 mercurial/context.py --- 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: