changeset 5744:9db7fd77417d

changelog: remove extract function
author Matt Mackall <mpm@selenic.com>
date Thu, 27 Dec 2007 23:55:40 -0600
parents df09fad0059e
children 234e40e636a8
files mercurial/changelog.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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={}):