revlog: drop base() again
authorMatt Mackall <mpm@selenic.com>
Wed, 18 May 2011 17:05:30 -0500
changeset 14371 ec2aae8b375d
parent 14370 17cea10c343e
child 14372 be0daa0eeb3e
revlog: drop base() again deltaparent does what's needed, and more "portably".
mercurial/commands.py
mercurial/revlog.py
--- a/mercurial/commands.py	Wed May 18 23:48:17 2011 +0200
+++ b/mercurial/commands.py	Wed May 18 17:05:30 2011 -0500
@@ -1865,7 +1865,9 @@
         ts = 0
         heads = set()
         for rev in xrange(numrevs):
-            dbase = r.base(rev)
+            dbase = r.deltaparent(rev)
+            if dbase == -1:
+                dbase = rev
             cbase = r.chainbase(rev)
             p1, p2 = r.parentrevs(rev)
             rs = r.rawsize(rev)
--- a/mercurial/revlog.py	Wed May 18 23:48:17 2011 +0200
+++ b/mercurial/revlog.py	Wed May 18 17:05:30 2011 -0500
@@ -320,8 +320,6 @@
         return self.start(rev) + self.length(rev)
     def length(self, rev):
         return self.index[rev][1]
-    def base(self, rev):
-        return self.index[rev][3]
     def chainbase(self, rev):
         index = self.index
         base = index[rev][3]