changelog: remove extract function
authorMatt Mackall <mpm@selenic.com>
Thu, 27 Dec 2007 23:55:40 -0600
changeset 5744 9db7fd77417d
parent 5743 df09fad0059e
child 5745 234e40e636a8
changelog: remove extract function
mercurial/changelog.py
--- a/mercurial/changelog.py	Thu Dec 27 23:55:40 2007 -0600
+++ b/mercurial/changelog.py	Thu Dec 27 23:55:40 2007 -0600
@@ -136,7 +136,7 @@
         items = [_string_escape('%s:%s' % (k, d[k])) for k in keys]
         return "\0".join(items)
 
-    def extract(self, text):
+    def read(self, node):
         """
         format used:
         nodeid\n        : manifest node in ascii
@@ -149,6 +149,7 @@
 
         changelog v0 doesn't use extra
         """
+        text = self.revision(node)
         if not text:
             return (nullid, "", (0, 0), [], "", {'branch': 'default'})
         last = text.index("\n\n")
@@ -175,9 +176,6 @@
         files = l[3:]
         return (manifest, user, (time, timezone), files, desc, extra)
 
-    def read(self, node):
-        return self.extract(self.revision(node))
-
     def add(self, manifest, list, desc, transaction, p1=None, p2=None,
                   user=None, date=None, extra={}):