/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 breezy/tests/per_branch/test_stacking.py

  • Committer: Jelmer Vernooij
  • Date: 2019-08-11 13:21:03 UTC
  • mfrom: (7379 work)
  • mto: This revision was merged to the branch mainline in revision 7388.
  • Revision ID: jelmer@jelmer.uk-20190811132103-u3ne03yf37c1h57n
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    def check_lines_added_or_present(self, stacked_branch, revid):
39
39
        # similar to a failure seen in bug 288751 by mbp 20081120
40
40
        stacked_repo = stacked_branch.repository
41
 
        stacked_repo.lock_read()
42
 
        try:
 
41
        with stacked_repo.lock_read():
43
42
            list(stacked_repo.inventories.iter_lines_added_or_present_in_keys(
44
43
                [(revid,)]))
45
 
        finally:
46
 
            stacked_repo.unlock()
47
44
 
48
45
    def test_get_set_stacked_on_url(self):
49
46
        # branches must either:
134
131
        # reading the graph from the stacked branch's repository should see
135
132
        # data from the stacked-on branch
136
133
        new_repo = new_branch.repository
137
 
        new_repo.lock_read()
138
 
        try:
 
134
        with new_repo.lock_read():
139
135
            self.assertEqual(new_repo.get_parent_map([trunk_revid]),
140
136
                             {trunk_revid: (NULL_REVISION, )})
141
 
        finally:
142
 
            new_repo.unlock()
143
137
 
144
138
    def test_sprout_stacked(self):
145
139
        # We have a mainline