D1231: overlayworkingctx: move _wrappedctx out of the constructor

phillco (Phil Cohen) phabricator at mercurial-scm.org
Fri Dec 1 08:09:45 UTC 2017


phillco updated this revision to Diff 4041.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1231?vs=3563&id=4041

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

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
@@ -2021,11 +2021,14 @@
     is `False`, the file was deleted.
     """
 
-    def __init__(self, repo, wrappedctx):
+    def __init__(self, repo):
         super(overlayworkingctx, self).__init__(repo)
         self._repo = repo
         self.clean()
+
+    def setbase(self, wrappedctx):
         self._wrappedctx = wrappedctx
+        self._parents = [wrappedctx]
 
     def data(self, path):
         if self.isdirty(path):



To: phillco, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list