D1240: overlayworkingctx: inherit from committablectx instead of workingctx

phillco (Phil Cohen) phabricator at mercurial-scm.org
Thu Dec 7 21:23:21 UTC 2017


phillco updated this revision to Diff 4186.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D1240?vs=3113&id=4186

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

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
@@ -2012,9 +2012,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?
@@ -2191,7 +2191,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()``."""
 



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


More information about the Mercurial-devel mailing list