changeset 19701:f0f8380ec516

commitablefilectx: add a class that will be used for mutable file contexts Just like commitablectx, this will serve as a common place for code that will be shared between workingfilectx and memfilectx.
author Sean Farley <sean.michael.farley@gmail.com>
date Thu, 15 Aug 2013 13:11:51 -0500
parents 8f48f5969b47
children d25fdd4c2fd1
files mercurial/context.py
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Wed Aug 14 16:40:34 2013 -0500
+++ b/mercurial/context.py	Thu Aug 15 13:11:51 2013 -0500
@@ -1188,7 +1188,13 @@
             finally:
                 wlock.release()
 
-class workingfilectx(basefilectx):
+class commitablefilectx(basefilectx):
+    """A commitablefilectx provides common functionality for a file context that
+    wants the ability to commit, e.g. workingfilectx or memfilectx."""
+    def __init__(self, repo, path, filelog=None, ctx=None):
+        pass
+
+class workingfilectx(commitablefilectx):
     """A workingfilectx object makes access to data related to a particular
        file in the working directory convenient."""
     def __init__(self, repo, path, filelog=None, workingctx=None):