Commit Graph

5 Commits

Author SHA1 Message Date
Siddharth Agarwal
696c998447 test-ancestor: use random testing for missing ancestors
We're going to make changes to the missing ancestor algorithm, and random
testing will give us much more confidence than a fixed set of tests.
2014-11-15 10:55:34 -08:00
Siddharth Agarwal
0f3bd4c81c test-ancestor: test iteration for lazyancestors
This has some test coverage in test-revlog-ancestry.py, but not very much.
2014-11-14 14:50:03 -08:00
Pierre-Yves David
1f9120a498 test-ancestor: add a test for ancestor with ancestry within the initset
I was wondering if revisions in the initial set that are still ancestors of other
elements in the initial set were yielded by `changelog.ancestors`. I now have my
answer (they do) and Mercurial has a new test.
2014-08-30 11:39:15 +02:00
Siddharth Agarwal
4fdbea480f ancestor: add lazy membership testing to lazyancestors
This also makes the perfancestorset command use lazy membership testing. In a
linear repository with over 400,000 commits, without this patch, hg
perfancestorset takes 0.80 seconds no matter how far behind we're looking.
With this patch, hg perfancestorset -- X takes:

    Rev X       Time
       -1      0.00s
    -4000      0.01s
   -20000      0.04s
   -80000      0.17s
  -200000      0.43s
  -300000      0.69s
        0      0.88s

Thus, for revisions close to tip, we're up to several orders of magnitude
faster. At 0 we're around 10% slower.
2012-12-18 12:47:20 -08:00
Siddharth Agarwal
40a1b50c25 ancestor: move missingancestors doctest out into a separate file
This is in preparation for upcoming patches which will reuse the same graph
for tests.
2012-12-11 14:47:33 -08:00