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
--- 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: