/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/blackbox/test_commit.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:
316
316
        this_tree.commit('create_files')
317
317
        other_dir = this_tree.controldir.sprout('other')
318
318
        other_tree = other_dir.open_workingtree()
319
 
        other_tree.lock_write()
320
 
        # perform the needed actions on the files and dirs.
321
 
        try:
 
319
        with other_tree.lock_write():
 
320
            # perform the needed actions on the files and dirs.
322
321
            other_tree.rename_one('dirtorename', 'renameddir')
323
322
            other_tree.rename_one('dirtoreparent', 'renameddir/reparenteddir')
324
323
            other_tree.rename_one('filetorename', 'renamedfile')
332
331
            other_tree.add('newfile')
333
332
            other_tree.add('newdir/')
334
333
            other_tree.commit('modify all sample files and dirs.')
335
 
        finally:
336
 
            other_tree.unlock()
337
334
        this_tree.merge_from_branch(other_tree.branch)
338
335
        out, err = self.run_bzr('commit -m added', working_dir='this')
339
336
        self.assertEqual('', out)