diff --git a/mercurial/changelog.py b/mercurial/changelog.py --- a/mercurial/changelog.py +++ b/mercurial/changelog.py @@ -186,8 +186,10 @@ class changelog(revlog.revlog): return self._nodecache def reachableroots(self, minroot, heads, roots, includepath=False): - return revset.baseset(sorted( - self.index.reachableroots2(minroot, heads, roots, includepath))) + rroots = self.index.reachableroots2(minroot, heads, roots, includepath) + rroots = revset.baseset(rroots) + rroots.sort() + return rroots def headrevs(self): if self.filteredrevs: diff --git a/tests/test-parseindex.t b/tests/test-parseindex.t --- a/tests/test-parseindex.t +++ b/tests/test-parseindex.t @@ -96,9 +96,9 @@ Test SEGV caused by bad revision passed > print inst > EOF good heads: - 0: - 1: - -1: + 0: + 1: + -1: bad heads: 2: head out of range 10000: head out of range @@ -106,14 +106,14 @@ Test SEGV caused by bad revision passed -10000: head out of range None: an integer is required good roots: - 0: - 1: - -1: + 0: + 1: + -1: out-of-range roots are ignored: - 2: - 10000: - -2: - -10000: + 2: + 10000: + -2: + -10000: bad roots: None: an integer is required diff --git a/tests/test-revset.t b/tests/test-revset.t --- a/tests/test-revset.t +++ b/tests/test-revset.t @@ -141,7 +141,7 @@ trivial ('symbol', '3') ('symbol', '6')) * set: - + 3 5 6 @@ -991,7 +991,7 @@ test that `or` operation skips duplicate ('symbol', '4'))) * set: , + , > 5 3 @@ -1014,7 +1014,7 @@ test that `or` operation skips duplicate * set: , - > + > 0 1 2