memctx: call super.__init__ instead of duplicating code
authorSean Farley <sean.michael.farley@gmail.com>
Thu, 15 Aug 2013 15:03:03 -0500
changeset 21666 31bdc51b0f1e
parent 21665 d2743be1bb06
child 21667 76ce63614887
memctx: call super.__init__ instead of duplicating code
mercurial/context.py
--- a/mercurial/context.py	Thu Aug 15 15:00:03 2013 -0500
+++ b/mercurial/context.py	Thu Aug 15 15:03:03 2013 -0500
@@ -1560,12 +1560,9 @@
     """
     def __init__(self, repo, parents, text, files, filectxfn, user=None,
                  date=None, extra=None, editor=False):
-        self._repo = repo
+        super(memctx, self).__init__(repo, text, user, date, extra)
         self._rev = None
         self._node = None
-        self._text = text
-        self._date = date and util.parsedate(date) or util.makedate()
-        self._user = user
         parents = [(p or nullid) for p in parents]
         p1, p2 = parents
         self._parents = [changectx(self._repo, p) for p in (p1, p2)]