D2968: memctx: create parent contexts using "repo[p]" syntax

2018-03-30 Thread martinvonz (Martin von Zweigbergk)
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG05ff1a155a21: memctx: create parent contexts using 
repo[p] syntax (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2968?vs=7370=7391

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -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:



To: martinvonz, #hg-reviewers, indygreg
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


D2968: memctx: create parent contexts using "repo[p]" syntax

2018-03-30 Thread martinvonz (Martin von Zweigbergk)
martinvonz created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  I want to reduce dependence on basectx.__new__() and move that code
  over to repo.__getitem__().

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS

diff --git a/mercurial/context.py b/mercurial/context.py
--- a/mercurial/context.py
+++ b/mercurial/context.py
@@ -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:



To: martinvonz, #hg-reviewers
Cc: mercurial-devel
___
Mercurial-devel mailing list
Mercurial-devel@mercurial-scm.org
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel