/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_pull.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
 
18
 
"""Black-box tests for bzr pull."""
 
18
"""Black-box tests for brz pull."""
19
19
 
20
20
import os
21
21
import sys
22
22
 
23
 
from bzrlib import (
 
23
from breezy import (
24
24
    branch,
25
25
    debug,
26
26
    osutils,
31
31
    workingtree,
32
32
    )
33
33
 
34
 
from bzrlib.directory_service import directories
35
 
from bzrlib.tests import (
 
34
from breezy.directory_service import directories
 
35
from breezy.tests import (
36
36
    fixtures,
37
37
    script,
38
38
    )
242
242
        # test pull for failure without parent set
243
243
        out = self.run_bzr('pull', retcode=3, working_dir='branch_b')
244
244
        self.assertEqual(out,
245
 
                ('','bzr: ERROR: No pull location known or specified.\n'))
 
245
                ('','brz: ERROR: No pull location known or specified.\n'))
246
246
        # test implicit --remember when no parent set, this pull conflicts
247
247
        self.build_tree(['branch_b/d'])
248
248
        tree_b.add('d')
250
250
        out = self.run_bzr('pull ../branch_a', retcode=3,
251
251
                           working_dir='branch_b')
252
252
        self.assertEqual(out,
253
 
                ('','bzr: ERROR: These branches have diverged.'
 
253
                ('','brz: ERROR: These branches have diverged.'
254
254
                    ' Use the missing command to see how.\n'
255
255
                    'Use the merge command to reconcile them.\n'))
256
256
        tree_b = tree_b.bzrdir.open_workingtree()
271
271
                         branch_b.get_parent())
272
272
 
273
273
    def test_pull_bundle(self):
274
 
        from bzrlib.testament import Testament
 
274
        from breezy.testament import Testament
275
275
        # Build up 2 trees and prepare for a pull
276
276
        tree_a = self.make_branch_and_tree('branch_a')
277
277
        with open('branch_a/a', 'wb') as f:
323
323
        self.assertNotContainsRe(out, 'foo')
324
324
 
325
325
    def test_pull_quiet(self):
326
 
        """Check that bzr pull --quiet does not print anything"""
 
326
        """Check that brz pull --quiet does not print anything"""
327
327
        tree_a = self.make_branch_and_tree('tree_a')
328
328
        self.build_tree(['tree_a/foo'])
329
329
        tree_a.add('foo')
383
383
        self.run_bzr(['pull', self.get_url('child')], working_dir='checkout')
384
384
 
385
385
    def test_pull_smart_stacked_streaming_acceptance(self):
386
 
        """'bzr pull -r 123' works on stacked, smart branches, even when the
 
386
        """'brz pull -r 123' works on stacked, smart branches, even when the
387
387
        revision specified by the revno is only present in the fallback
388
388
        repository.
389
389
 
473
473
            "(?m)Fetching into experimental format")
474
474
 
475
475
    def test_pull_show_base(self):
476
 
        """bzr pull supports --show-base
 
476
        """brz pull supports --show-base
477
477
 
478
478
        see https://bugs.launchpad.net/bzr/+bug/202374"""
479
479
        # create two trees with conflicts, setup conflict, check that
565
565
 
566
566
    def test_pull_log_format(self):
567
567
        self.run_script("""
568
 
            $ bzr init trunk
 
568
            $ brz init trunk
569
569
            Created a standalone tree (format: 2a)
570
570
            $ cd trunk
571
571
            $ echo foo > file
572
 
            $ bzr add
 
572
            $ brz add
573
573
            adding file
574
 
            $ bzr commit -m 'we need some foo'
 
574
            $ brz commit -m 'we need some foo'
575
575
            2>Committing to:...trunk/
576
576
            2>added file
577
577
            2>Committed revision 1.
578
578
            $ cd ..
579
 
            $ bzr init feature
 
579
            $ brz init feature
580
580
            Created a standalone tree (format: 2a)
581
581
            $ cd feature
582
 
            $ bzr pull -v ../trunk -Olog_format=line
 
582
            $ brz pull -v ../trunk -Olog_format=line
583
583
            Now on revision 1.
584
584
            Added Revisions:
585
585
            1: jrandom@example.com ...we need some foo