/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_status.py

  • Committer: Andrew Bennetts
  • Date: 2008-10-27 06:14:45 UTC
  • mfrom: (3793 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3795.
  • Revision ID: andrew.bennetts@canonical.com-20081027061445-eqt9lz6uw1mbvq4g
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
    bzrdir,
33
33
    conflicts,
34
34
    errors,
 
35
    osutils,
35
36
    )
36
37
import bzrlib.branch
37
38
from bzrlib.osutils import pathjoin
298
299
        self.assertEqual("working tree is out of date, run 'bzr update'\n",
299
300
                         err)
300
301
 
 
302
    def test_status_write_lock(self):
 
303
        """Test that status works without fetching history and
 
304
        having a write lock.
 
305
 
 
306
        See https://bugs.launchpad.net/bzr/+bug/149270
 
307
        """
 
308
        mkdir('branch1')
 
309
        wt = self.make_branch_and_tree('branch1')
 
310
        b = wt.branch
 
311
        wt.commit('Empty commit 1')
 
312
        wt2 = b.bzrdir.sprout('branch2').open_workingtree()
 
313
        wt2.commit('Empty commit 2')
 
314
        out, err = self.run_bzr('status branch1 -rbranch:branch2')
 
315
        self.assertEqual('', out)
 
316
 
301
317
 
302
318
class CheckoutStatus(BranchStatus):
303
319
 
463
479
    
464
480
    def setUp(self):
465
481
        TestCaseWithTransport.setUp(self)
466
 
        self.user_encoding = bzrlib.user_encoding
 
482
        self.user_encoding = osutils._cached_user_encoding
467
483
        self.stdout = sys.stdout
468
484
 
469
485
    def tearDown(self):
485
501
 
486
502
    def test_stdout_ascii(self):
487
503
        sys.stdout = StringIO()
488
 
        bzrlib.user_encoding = 'ascii'
 
504
        osutils._cached_user_encoding = 'ascii'
489
505
        working_tree = self.make_uncommitted_tree()
490
506
        stdout, stderr = self.run_bzr("status")
491
507
 
496
512
 
497
513
    def test_stdout_latin1(self):
498
514
        sys.stdout = StringIO()
499
 
        bzrlib.user_encoding = 'latin-1'
 
515
        osutils._cached_user_encoding = 'latin-1'
500
516
        working_tree = self.make_uncommitted_tree()
501
517
        stdout, stderr = self.run_bzr('status')
502
518