Mercurial > hg-stable
changeset 35298:2f8c476c49fe
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
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Thu, 07 Dec 2017 13:20:47 -0800 |
parents | 5db3c748ce8f |
children | 482614b3802a |
files | mercurial/context.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Thu Dec 07 13:20:47 2017 -0800 +++ b/mercurial/context.py Thu Dec 07 13:20:47 2017 -0800 @@ -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):