# HG changeset patch # User Phil Cohen # Date 2017-12-07 21:20:47 # Node ID 2f8c476c49fe6c801be5b77feca2b3a27bc0a6ee # Parent 5db3c748ce8f67ca256832d07f0f9fc0116f4bb4 overlayworkingctx: move _wrappedctx out of the constructor With rebase, we will be setting the _wrappedctx at a different point from the wctx construction (somewhat later, and possibly several times). Move it to a public function. Differential Revision: https://phab.mercurial-scm.org/D1231 diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1990,11 +1990,14 @@ class overlayworkingctx(workingctx): 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):