Mercurial > hgsubversion
diff tests/comprehensive/test_verify_and_startrev.py @ 899:7f90bb48c9de
svn verify: use a custom editor and get_revision()
Previously, we would fetch each file in the revision/changeset
individually. With this change, we fetch the entire revision in one
request, and use a custom editor to verify its contents. This is quite
a lot faster than the previous means when verifying over the internet.
By an order of magnitude or two, in fact. As data is transfered in a
single operation, verifying a revision from PyPy took 30 seconds
rather than 30 minutes, and saturated my 10Mbps connection.
Please note that the output ordering isn't stable between the two;
output will appear in reverse order when using the fast verifier.
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Wed, 14 Dec 2011 00:07:58 +0100 |
parents | 6bc8046e3d0a |
children | f9014e28721b |
line wrap: on
line diff
--- a/tests/comprehensive/test_verify_and_startrev.py +++ b/tests/comprehensive/test_verify_and_startrev.py @@ -42,7 +42,10 @@ def _do_case(self, name, stupid, layout) assert len(self.repo) > 0 for i in repo: ctx = repo[i] - self.assertEqual(verify.verify(repo.ui, repo, rev=ctx.node()), 0) + self.assertEqual(verify.verify(repo.ui, repo, rev=ctx.node(), + stupid=True), 0) + self.assertEqual(verify.verify(repo.ui, repo, rev=ctx.node(), + stupid=False), 0) # check a startrev clone if layout == 'single' and name not in _skipshallow: @@ -59,7 +62,18 @@ def _do_case(self, name, stupid, layout) repo.ui.pushbuffer() self.assertEqual(0, verify.verify(repo.ui, shallowrepo, - rev=shallowtip.node())) + rev=shallowtip.node(), + stupid=True)) + self.assertEqual(0, verify.verify(repo.ui, shallowrepo, + rev=shallowtip.node(), + stupid=False)) + + stupidui = ui.ui(repo.ui) + stupidui.config('hgsubversion', 'stupid', True) + self.assertEqual(verify.verify(stupidui, repo, rev=ctx.node(), + stupid=True), 0) + self.assertEqual(verify.verify(stupidui, repo, rev=ctx.node(), + stupid=False), 0) # viewing diff's of lists of files is easier on the eyes self.assertMultiLineEqual('\n'.join(fulltip), '\n'.join(shallowtip),