~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_status.py

  • Committer: John Arbash Meinel
  • Date: 2010-09-29 20:18:37 UTC
  • mfrom: (5450 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5452.
  • Revision ID: john@arbash-meinel.com-20100929201837-6d9jhvjokfe3ubvk
Merge bzr.dev 5450 to resolve NEWS and criss-cross merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    conflicts,
34
34
    errors,
35
35
    osutils,
 
36
    status,
36
37
    )
37
38
import bzrlib.branch
38
39
from bzrlib.osutils import pathjoin
520
521
        out, err = self.run_bzr('status branch1 -rbranch:branch2')
521
522
        self.assertEqual('', out)
522
523
 
 
524
    def test_status_with_shelves(self):
 
525
        """Ensure that _show_shelve_summary handler works.
 
526
        """
 
527
        wt = self.make_branch_and_tree('.')
 
528
        self.build_tree(['hello.c'])
 
529
        wt.add('hello.c')
 
530
        self.run_bzr(['shelve', '--all', '-m', 'foo'])
 
531
        self.build_tree(['bye.c'])
 
532
        wt.add('bye.c')
 
533
        # As TestCase.setUp clears all hooks, we install this default
 
534
        # post_status hook handler for the test.
 
535
        status.hooks.install_named_hook('post_status',
 
536
            status._show_shelve_summary,
 
537
            'bzr status')
 
538
        self.assertStatus([
 
539
                'added:\n',
 
540
                '  bye.c\n',
 
541
                '1 shelves exist. See "bzr shelve --list" for details.\n',
 
542
            ],
 
543
            wt)
 
544
 
523
545
 
524
546
class CheckoutStatus(BranchStatus):
525
547