Patchwork D1231: overlayworkingctx: move _wrappedctx out of the constructor

login
register
mail settings
Submitter phabricator
Date Dec. 7, 2017, 10:15 p.m.
Message ID <ad9c591ae03e99b1381de65c634569a6@localhost.localdomain>
Download mbox | patch
Permalink /patch/26053/
State Not Applicable
Headers show

Comments

phabricator - Dec. 7, 2017, 10:15 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG2f8c476c49fe: overlayworkingctx: move _wrappedctx out of the constructor (authored by phillco, committed by ).

REPOSITORY
  rHG Mercurial

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

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

AFFECTED FILES
  mercurial/context.py

CHANGE DETAILS




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

Patch

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