/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/blackbox/test_check.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-31 17:42:29 UTC
  • mto: This revision was merged to the branch mainline in revision 4611.
  • Revision ID: john@arbash-meinel.com-20090731174229-w2zdsdlfpeddk8gl
Now we got to the per-workingtree tests, etc.

The main causes seem to break down into:
  bzrdir.clone() is known to be broken wrt locking, this effects
  everything that tries to 'push'

  shelf code is not compatible with strict locking

  merge code seems to have an issue. This might actually be the
  root cause of the clone() problems.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007, 2009 Canonical Ltd
 
1
# Copyright (C) 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
34
34
        tree = self.make_branch_and_tree('.')
35
35
        tree.commit('hallelujah')
36
36
        out, err = self.run_bzr('check')
37
 
        self.assertContainsRe(err, r"Checking working tree at '.*'\.\n")
38
 
        self.assertContainsRe(err, r"Checking repository at '.*'\.\n")
39
 
        # the root directory may be in the texts for rich root formats
40
 
        self.assertContainsRe(err, r"checked repository.*\n"
 
37
        self.assertContainsRe(err, r"^Checking working tree at '.*'\.\n"
 
38
                                   r"Checking repository at '.*'\.\n"
 
39
                                   r"checked repository.*\n"
41
40
                                   r"     1 revisions\n"
42
 
                                   r"     [01] file-ids\n"
43
 
                                   )
44
 
        self.assertContainsRe(err, r"Checking branch at '.*'\.\n")
45
 
        self.assertContainsRe(err, r"checked branch.*")
 
41
                                   r"     0 file-ids\n"
 
42
                                   r"     0 unique file texts\n"
 
43
                                   r"     0 repeated file texts\n"
 
44
                                   r"     0 unreferenced text versions\n"
 
45
                                   r"Checking branch at '.*'\.\n"
 
46
                                   r"checked branch.*\n$")
46
47
 
47
48
    def test_check_branch(self):
48
49
        tree = self.make_branch_and_tree('.')
49
50
        tree.commit('foo')
50
51
        out, err = self.run_bzr('check --branch')
51
52
        self.assertContainsRe(err, r"^Checking branch at '.*'\.\n"
52
 
                                   r"checked branch.*")
 
53
                                   r"checked branch.*\n$")
53
54
 
54
55
    def test_check_repository(self):
55
56
        tree = self.make_branch_and_tree('.')
58
59
        self.assertContainsRe(err, r"^Checking repository at '.*'\.\n"
59
60
                                   r"checked repository.*\n"
60
61
                                   r"     1 revisions\n"
61
 
                                   r"     [01] file-ids\n"
62
 
                                   )
 
62
                                   r"     0 file-ids\n"
 
63
                                   r"     0 unique file texts\n"
 
64
                                   r"     0 repeated file texts\n"
 
65
                                   r"     0 unreferenced text versions$")
63
66
 
64
67
    def test_check_tree(self):
65
68
        tree = self.make_branch_and_tree('.')
73
76
        out, err = self.run_bzr('check --tree --branch')
74
77
        self.assertContainsRe(err, r"^Checking working tree at '.*'\.\n"
75
78
                                   r"Checking branch at '.*'\.\n"
76
 
                                   r"checked branch.*")
 
79
                                   r"checked branch.*\n$")
77
80
 
78
81
    def test_check_missing_tree(self):
79
82
        branch = self.make_branch('.')
84
87
        branch = self.make_branch('.')
85
88
        out, err = self.run_bzr('check --tree --branch')
86
89
        self.assertContainsRe(err,
 
90
            r"^No working tree found at specified location\.\n"
87
91
            r"Checking branch at '.*'\.\n"
88
 
            r"No working tree found at specified location\.\n"
89
 
            r"checked branch.*")
 
92
            r"checked branch.*\n$")
90
93
 
91
94
    def test_check_missing_branch_in_shared_repo(self):
92
95
        self.make_repository('shared', shared=True)