revlog.py: always return tuples from parents and parentrevs
authorAlexis S. L. Carvalho <alexis@cecm.usp.br>
Tue, 24 Oct 2006 23:00:43 -0300
changeset 3508 0aef94f45ebf
parent 3504 f4ab58d4ccd4
child 3509 9de0e64545a3
revlog.py: always return tuples from parents and parentrevs There's at least one place doing parentrevs(rev) != (rev-1, -1), which is always true with revlog v0, since parentrevs returns a list in this case.
mercurial/revlog.py
--- a/mercurial/revlog.py	Tue Oct 24 17:22:07 2006 -0500
+++ b/mercurial/revlog.py	Tue Oct 24 23:00:43 2006 -0300
@@ -481,13 +481,13 @@
         d = self.index[r][-3:-1]
         if self.version == REVLOGV0:
             return d
-        return [ self.node(x) for x in d ]
+        return (self.node(d[0]), self.node(d[1]))
     def parentrevs(self, rev):
         if rev == -1:
             return (-1, -1)
         d = self.index[rev][-3:-1]
         if self.version == REVLOGV0:
-            return [ self.rev(x) for x in d ]
+            return (self.rev(d[0]), self.rev(d[1]))
         return d
     def start(self, rev):
         if rev < 0: