# HG changeset patch # User Pierre-Yves David # Date 1413526285 25200 # Node ID 6f1b8b3f12fd2cb4d956bd2f3b73daab6fcc73c2 # Parent 69524a05a7fa57ca96d368d18cde5874b95d2125 revset-ancestorspec: call 'getset' on a 'fullreposet' Calling 'baseset(repo.changelog)' builds a list for all revisions in the repo. And we already have the lazy and efficient 'fullreposet' class for this purpose. This gives us the usual benefits of the fullreposet: revset) 100~5 before) wall 0.002712 comb 0.000000 user 0.000000 sys 0.000000 (best of 918) after) wall 0.000996 comb 0.000000 user 0.000000 sys 0.000000 (best of 2493) revset) parents(100)~5 before) wall 0.003812 comb 0.010000 user 0.010000 sys 0.000000 (best of 667) after) wall 0.001038 comb 0.000000 user 0.000000 sys 0.000000 (best of 2361) revset) (100~5)~5 before) wall 0.005614 comb 0.000000 user 0.000000 sys 0.000000 (best of 446) after) wall 0.001035 comb 0.000000 user 0.000000 sys 0.000000 (best of 2424) diff -r 69524a05a7fa -r 6f1b8b3f12fd mercurial/revset.py --- a/mercurial/revset.py Thu Oct 16 23:10:44 2014 -0700 +++ b/mercurial/revset.py Thu Oct 16 23:11:25 2014 -0700 @@ -370,7 +370,7 @@ raise error.ParseError(_("~ expects a number")) ps = set() cl = repo.changelog - for r in getset(repo, baseset(cl), x): + for r in getset(repo, fullreposet(repo), x): for i in range(n): r = cl.parentrevs(r)[0] ps.add(r)