Mercurial > hg-stable
changeset 35332:8e1386b342f7
overlayworkingctx: inherit from committablectx instead of workingctx
We should find a better name for this context at some point. (mutablememctx?)
Differential Revision: https://phab.mercurial-scm.org/D1240
author | Phil Cohen <phillco@fb.com> |
---|---|
date | Thu, 07 Dec 2017 16:07:06 -0800 |
parents | baf58e621363 |
children | 72fbdd373de8 |
files | mercurial/context.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/context.py Thu Dec 07 16:07:06 2017 -0800 +++ b/mercurial/context.py Thu Dec 07 16:07:06 2017 -0800 @@ -1976,9 +1976,9 @@ def setflags(self, l, x): self._repo.wvfs.setflags(self._path, l, x) -class overlayworkingctx(workingctx): - """Wraps another mutable context with a write-back cache that can be flushed - at a later time. +class overlayworkingctx(committablectx): + """Wraps another mutable context with a write-back cache that can be + converted into a commit context. self._cache[path] maps to a dict with keys: { 'exists': bool? @@ -2161,7 +2161,7 @@ return overlayworkingfilectx(self._repo, path, parent=self, filelog=filelog) -class overlayworkingfilectx(workingfilectx): +class overlayworkingfilectx(committablefilectx): """Wrap a ``workingfilectx`` but intercepts all writes into an in-memory cache, which can be flushed through later by calling ``flush()``."""