/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/repository_implementations/test_check.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-10-24 06:48:13 UTC
  • mfrom: (2592.3.241 mbp-packrepo-as-knits)
  • Revision ID: pqm@pqm.ubuntu.com-20071024064813-wjcmv8ofabf6kdrb
Pack repositories!

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
        """
40
40
        repo = self.make_repo_with_extra_ghost_index()
41
41
        self.assertEqual(
42
 
            [('revision-id', ['incorrect-parent'], [])],
 
42
            [('revision-id', ('incorrect-parent',), ())],
43
43
            list(repo._find_inconsistent_revision_parents()))
44
44
 
45
45
    def test__check_for_inconsistent_revision_parents(self):
59
59
        if not repo.revision_graph_can_have_wrong_parents():
60
60
            raise TestNotApplicable(
61
61
                '%r cannot have corrupt revision index.' % repo)
62
 
        repo._check_for_inconsistent_revision_parents()  # nothing happens
 
62
        repo.lock_read()
 
63
        try:
 
64
            repo._check_for_inconsistent_revision_parents()  # nothing happens
 
65
        finally:
 
66
            repo.unlock()
63
67
 
64
68
    def test_check_reports_bad_ancestor(self):
65
69
        repo = self.make_repo_with_extra_ghost_index()
75
79
        self.assertContainsRe(
76
80
            log,
77
81
            "revision-id has wrong parents in index: "
78
 
            r"\['incorrect-parent'\] should be \[\]")
 
82
            r"\('incorrect-parent',\) should be \(\)")
79
83