/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: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
import sys
29
29
from tempfile import TemporaryFile
30
30
 
31
 
from bzrlib import (
 
31
from breezy import (
32
32
    bzrdir,
33
33
    conflicts,
34
34
    errors,
35
35
    osutils,
36
36
    status,
37
37
    )
38
 
import bzrlib.branch
39
 
from bzrlib.osutils import pathjoin
40
 
from bzrlib.revisionspec import RevisionSpec
41
 
from bzrlib.status import show_tree_status
42
 
from bzrlib.tests import TestCaseWithTransport, TestSkipped
43
 
from bzrlib.workingtree import WorkingTree
 
38
import breezy.branch
 
39
from breezy.osutils import pathjoin
 
40
from breezy.revisionspec import RevisionSpec
 
41
from breezy.status import show_tree_status
 
42
from breezy.tests import TestCaseWithTransport, TestSkipped
 
43
from breezy.workingtree import WorkingTree
44
44
 
45
45
 
46
46
class BranchStatus(TestCaseWithTransport):
51
51
        # post_status hook handler for the test.
52
52
        status.hooks.install_named_hook('post_status',
53
53
            status._show_shelve_summary,
54
 
            'bzr status')
 
54
            'brz status')
55
55
 
56
56
    def assertStatus(self, expected_lines, working_tree, specific_files=None,
57
57
        revision=None, short=False, pending=True, verbose=False):
361
361
        # Okay, everything's looking good with the existent files.
362
362
        # Let's see what happens when we throw in non-existent files.
363
363
 
364
 
        # bzr st [--short] NONEXISTENT '
 
364
        # brz st [--short] NONEXISTENT '
365
365
        expected = [
366
366
          'nonexistent:\n',
367
367
          '  NONEXISTENT\n',
380
380
                              'NONEXISTENT.*')
381
381
 
382
382
    def test_status_nonexistent_file_with_others(self):
383
 
        # bzr st [--short] NONEXISTENT ...others..
 
383
        # brz st [--short] NONEXISTENT ...others..
384
384
        wt = self._prepare_nonexistent()
385
385
        expected = [
386
386
          'removed:\n',
413
413
                              'NONEXISTENT.*')
414
414
 
415
415
    def test_status_multiple_nonexistent_files(self):
416
 
        # bzr st [--short] NONEXISTENT ... ANOTHER_NONEXISTENT ...
 
416
        # brz st [--short] NONEXISTENT ... ANOTHER_NONEXISTENT ...
417
417
        wt = self._prepare_nonexistent()
418
418
        expected = [
419
419
          'removed:\n',
448
448
                              'ANOTHER_NONEXISTENT NONEXISTENT.*')
449
449
 
450
450
    def test_status_nonexistent_file_with_unversioned(self):
451
 
        # bzr st [--short] NONEXISTENT A B UNVERSIONED_BUT_EXISTING C D E Q
 
451
        # brz st [--short] NONEXISTENT A B UNVERSIONED_BUT_EXISTING C D E Q
452
452
        wt = self._prepare_nonexistent()
453
453
        expected = [
454
454
          'removed:\n',
503
503
            # before run another commands we should unlock tree
504
504
            tree.unlock()
505
505
        out, err = self.run_bzr('status')
506
 
        self.assertEqual("working tree is out of date, run 'bzr update'\n",
 
506
        self.assertEqual("working tree is out of date, run 'brz update'\n",
507
507
                         err)
508
508
 
509
509
    def test_status_on_ignored(self):
566
566
        self.assertStatus([
567
567
                'added:\n',
568
568
                '  bye.c\n',
569
 
                '1 shelf exists. See "bzr shelve --list" for details.\n',
 
569
                '1 shelf exists. See "brz shelve --list" for details.\n',
570
570
            ],
571
571
            wt)
572
572
        self.run_bzr(['shelve', '--all', '-m', 'bar'])
577
577
                'added:\n',
578
578
                '  eggs.c\n',
579
579
                '  spam.c\n',
580
 
                '2 shelves exist. See "bzr shelve --list" for details.\n',
 
580
                '2 shelves exist. See "brz shelve --list" for details.\n',
581
581
            ],
582
582
            wt)
583
583
        self.assertStatus([