changeset 381:024ee0f8722a

Ancestor algorithm fix -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ancestor algorithm fix The ancestor algorithm was a bit too optimistic about node ordering still. Add revision numbers to the comparison to sort things out. manifest hash: f4eaf95057b5623e864359706dcaee820b10fd20 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCsTrCywK+sNU5EO8RAtqMAJ9fEJEesPn+0SMg/i/g5vZYmX/pBgCfVnhl +s88q/Wilw27MVWP6J6oqX8= =k9AU -----END PGP SIGNATURE-----
author mpm@selenic.com
date Thu, 16 Jun 2005 00:39:30 -0800
parents c72ccad3e3b8
children 37249c522770
files mercurial/revlog.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/revlog.py	Wed Jun 15 21:23:07 2005 -0800
+++ b/mercurial/revlog.py	Thu Jun 16 00:39:30 2005 -0800
@@ -325,10 +325,10 @@
             earliest = self.count()
             while h:
                 d, n = heapq.heappop(h)
-                r = self.rev(n)
                 if n not in seen:
                     seen[n] = 1
-                    yield (-d, n)
+                    r = self.rev(n)
+                    yield (-d, r, n)
                     for p in self.parents(n):
                         heapq.heappush(h, (-dist[p], p))
 
@@ -341,7 +341,7 @@
         # the other, or they match
         while 1:
             if lx == ly:
-                return lx[1]
+                return lx[2]
             elif lx < ly:
                 ly = y.next()
             elif lx > ly: