Mercurial > hgsubversion
comparison tests/comprehensive/test_verify_and_startrev.py @ 897:6bc8046e3d0a
move verify to a file of its own
author | Dan Villiom Podlaski Christiansen <danchr@gmail.com> |
---|---|
date | Sun, 13 May 2012 15:36:45 +0200 |
parents | 9562f606c4aa |
children | 7f90bb48c9de |
comparison
equal
deleted
inserted
replaced
896:04dfc23688b9 | 897:6bc8046e3d0a |
---|---|
12 import test_util | 12 import test_util |
13 | 13 |
14 from mercurial import hg | 14 from mercurial import hg |
15 from mercurial import ui | 15 from mercurial import ui |
16 | 16 |
17 from hgsubversion import svncommands | 17 from hgsubversion import verify |
18 | 18 |
19 # these fixtures contain no files at HEAD and would result in empty clones | 19 # these fixtures contain no files at HEAD and would result in empty clones |
20 _skipshallow = set([ | 20 _skipshallow = set([ |
21 'binaryfiles.svndump', | 21 'binaryfiles.svndump', |
22 'binaryfiles-broken.svndump', | 22 'binaryfiles-broken.svndump', |
40 repo, svnpath = self.load_and_fetch(name, subdir=subdir, stupid=stupid, | 40 repo, svnpath = self.load_and_fetch(name, subdir=subdir, stupid=stupid, |
41 layout=layout) | 41 layout=layout) |
42 assert len(self.repo) > 0 | 42 assert len(self.repo) > 0 |
43 for i in repo: | 43 for i in repo: |
44 ctx = repo[i] | 44 ctx = repo[i] |
45 self.assertEqual(svncommands.verify(repo.ui, repo, rev=ctx.node()), 0) | 45 self.assertEqual(verify.verify(repo.ui, repo, rev=ctx.node()), 0) |
46 | 46 |
47 # check a startrev clone | 47 # check a startrev clone |
48 if layout == 'single' and name not in _skipshallow: | 48 if layout == 'single' and name not in _skipshallow: |
49 self.wc_path += '_shallow' | 49 self.wc_path += '_shallow' |
50 shallowrepo = self.fetch(svnpath, subdir=subdir, stupid=stupid, | 50 shallowrepo = self.fetch(svnpath, subdir=subdir, stupid=stupid, |
56 | 56 |
57 fulltip = repo['tip'] | 57 fulltip = repo['tip'] |
58 shallowtip = shallowrepo['tip'] | 58 shallowtip = shallowrepo['tip'] |
59 | 59 |
60 repo.ui.pushbuffer() | 60 repo.ui.pushbuffer() |
61 self.assertEqual(0, svncommands.verify(repo.ui, shallowrepo, | 61 self.assertEqual(0, verify.verify(repo.ui, shallowrepo, |
62 rev=shallowtip.node())) | 62 rev=shallowtip.node())) |
63 | 63 |
64 # viewing diff's of lists of files is easier on the eyes | 64 # viewing diff's of lists of files is easier on the eyes |
65 self.assertMultiLineEqual('\n'.join(fulltip), '\n'.join(shallowtip), | 65 self.assertMultiLineEqual('\n'.join(fulltip), '\n'.join(shallowtip), |
66 repo.ui.popbuffer()) | 66 repo.ui.popbuffer()) |
67 | 67 |