# HG changeset patch # User mpm@selenic.com # Date 2005-06-16 08:39:30 # Node ID 024ee0f8722ac970186170c74d2e884141c17a8e # Parent c72ccad3e3b87ad8853b99f2af2eefab14acb9f3 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----- diff --git a/mercurial/revlog.py b/mercurial/revlog.py --- a/mercurial/revlog.py +++ b/mercurial/revlog.py @@ -325,10 +325,10 @@ class revlog: 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 @@ class revlog: # 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: