changeset 14371:ec2aae8b375d

revlog: drop base() again deltaparent does what's needed, and more "portably".
author Matt Mackall <mpm@selenic.com>
date Wed, 18 May 2011 17:05:30 -0500
parents 17cea10c343e
children be0daa0eeb3e
files mercurial/commands.py mercurial/revlog.py
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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]