diff -r 41b8892a2054 -r 42a116f1cdc1 mercurial/branchmap.py --- a/mercurial/branchmap.py Tue Sep 03 02:13:03 2024 +0200 +++ b/mercurial/branchmap.py Tue Sep 03 11:11:17 2024 +0200 @@ -884,8 +884,7 @@ elif self.tiprev == cl.tiprev(): return cl.headrevs() else: - # XXX passing tiprev as ceiling of cl.headrevs could be faster - heads = cl.headrevs(cl.revs(stop=self.tiprev)) + heads = cl.headrevs(stop_rev=self.tiprev + 1) return heads def _write_header(self, fp) -> None: