[PATCH 5 of 6] revlog: make getcandidaterevs more consistent about updating tested revs set

Paul Morelle paul.morelle at octobus.net
Mon May 21 17:47:57 EDT 2018


# HG changeset patch
# User Paul Morelle <paul.morelle at octobus.net>
# Date 1520417422 -3600
#      Wed Mar 07 11:10:22 2018 +0100
# Node ID fbb85c011ea4c6ba474dbe616f63543cffb5f909
# Parent  3270177368354d88aba86d5b00b96b7fecadd65b
# EXP-Topic semi-snapshots
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r fbb85c011ea4
revlog: make getcandidaterevs more consistent about updating tested revs set

Like in previous cases, update the set of tested revisions after yielding

diff -r 327017736835 -r fbb85c011ea4 mercurial/revlog.py
--- a/mercurial/revlog.py	Wed Mar 07 12:00:58 2018 +0100
+++ b/mercurial/revlog.py	Wed Mar 07 11:10:22 2018 +0100
@@ -331,13 +331,14 @@
                     # Pick whichever parent is closer to us (to minimize the
                     # chance of having to build a fulltext).
                     parents = [max(parents)]
+                yield parents
                 tested.update(parents)
-                yield parents
 
             if prev not in tested:
                 # other approach failed try against prev to hopefully save us a
                 # fulltext.
                 yield (prev,)
+                tested.add(prev)
 
     def buildtext(self, revinfo, fh):
         """Builds a fulltext version of a revision


More information about the Mercurial-devel mailing list