/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_status.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:
497
497
        """Simulate status of out-of-date tree after remote push"""
498
498
        tree = self.make_branch_and_tree('.')
499
499
        self.build_tree_contents([('a', b'foo\n')])
500
 
        tree.lock_write()
501
 
        try:
 
500
        with tree.lock_write():
502
501
            tree.add(['a'])
503
502
            tree.commit('add test file')
504
503
            # simulate what happens after a remote push
505
504
            tree.set_last_revision(b"0")
506
 
        finally:
507
 
            # before run another commands we should unlock tree
508
 
            tree.unlock()
509
505
        out, err = self.run_bzr('status')
510
506
        self.assertEqual("working tree is out of date, run 'brz update'\n",
511
507
                         err)