changeset 19702:d25fdd4c2fd1

commitablefilectx: move __init__ from workingfilectx
author Sean Farley <sean.michael.farley@gmail.com>
date Thu, 15 Aug 2013 13:12:50 -0500
parents f0f8380ec516
children d2936bec530b
files mercurial/context.py
diffstat 1 files changed, 8 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Thu Aug 15 13:11:51 2013 -0500
+++ b/mercurial/context.py	Thu Aug 15 13:12:50 2013 -0500
@@ -1192,12 +1192,6 @@
     """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):
         self._repo = repo
         self._path = path
         self._changeid = None
@@ -1205,8 +1199,14 @@
 
         if filelog is not None:
             self._filelog = filelog
-        if workingctx:
-            self._changectx = workingctx
+        if ctx:
+            self._changectx = ctx
+
+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):
+        super(workingfilectx, self).__init__(repo, path, filelog, workingctx)
 
     @propertycache
     def _changectx(self):