commitablectx: move __init__ from workingctx
authorSean Farley <sean.michael.farley@gmail.com>
Wed, 14 Aug 2013 15:24:58 -0500
changeset 19665 cb0c94ef1ebe
parent 19664 61dcb2aa7378
child 19666 09459edfb48b
commitablectx: move __init__ from workingctx
mercurial/context.py
--- a/mercurial/context.py	Wed Aug 14 15:02:08 2013 -0500
+++ b/mercurial/context.py	Wed Aug 14 15:24:58 2013 -0500
@@ -826,19 +826,6 @@
     wants the ability to commit, e.g. workingctx or memctx."""
     def __init__(self, repo, text="", user=None, date=None, extra=None,
                  changes=None):
-        pass
-
-class workingctx(commitablectx):
-    """A workingctx object makes access to data related to
-    the current working directory convenient.
-    date - any valid date string or (unixtime, offset), or None.
-    user - username string, or None.
-    extra - a dictionary of extra values, or None.
-    changes - a list of file lists as returned by localrepo.status()
-               or None to use the repository status.
-    """
-    def __init__(self, repo, text="", user=None, date=None, extra=None,
-                 changes=None):
         self._repo = repo
         self._rev = None
         self._node = None
@@ -869,6 +856,19 @@
         if self._extra['branch'] == '':
             self._extra['branch'] = 'default'
 
+class workingctx(commitablectx):
+    """A workingctx object makes access to data related to
+    the current working directory convenient.
+    date - any valid date string or (unixtime, offset), or None.
+    user - username string, or None.
+    extra - a dictionary of extra values, or None.
+    changes - a list of file lists as returned by localrepo.status()
+               or None to use the repository status.
+    """
+    def __init__(self, repo, text="", user=None, date=None, extra=None,
+                 changes=None):
+        super(workingctx, self).__init__(repo, text, user, date, extra, changes)
+
     def __str__(self):
         return str(self._parents[0]) + "+"