~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(vila) Allows ``log_format`` to be used with ``-O``. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from bzrlib import (
24
24
    debug,
25
25
    remote,
 
26
    tests,
26
27
    urlutils,
27
28
    )
28
29
 
31
32
from bzrlib.osutils import pathjoin
32
33
from bzrlib.tests import (
33
34
    fixtures,
34
 
    TestCaseWithTransport,
 
35
    script,
35
36
    )
36
37
from bzrlib.uncommit import uncommit
37
38
from bzrlib.workingtree import WorkingTree
38
39
 
39
40
 
40
 
class TestPull(TestCaseWithTransport):
 
41
class TestPull(tests.TestCaseWithTransport):
41
42
 
42
43
    def example_branch(self, path='.'):
43
44
        tree = self.make_branch_and_tree(path)
422
423
        self.assertLength(19, self.hpss_calls)
423
424
        remote = Branch.open('stacked')
424
425
        self.assertEndsWith(remote.get_stacked_on_url(), '/parent')
425
 
    
 
426
 
426
427
    def test_pull_cross_format_warning(self):
427
428
        """You get a warning for probably slow cross-format pulls.
428
429
        """
553
554
        out = self.run_bzr(['pull', '--overwrite', '-d', 'to', 'from'])
554
555
        self.assertEqual(out,
555
556
            ('No revisions or tags to pull.\n', ''))
 
557
 
 
558
 
 
559
class TestPullOutput(script.TestCaseWithTransportAndScript):
 
560
 
 
561
    def test_pull_log_format(self):
 
562
        self.run_script("""
 
563
            $ bzr init trunk
 
564
            Created a standalone tree (format: 2a)
 
565
            $ cd trunk
 
566
            $ echo foo > file
 
567
            $ bzr add
 
568
            adding file
 
569
            $ bzr commit -m 'we need some foo'
 
570
            2>Committing to:...trunk/
 
571
            2>added file
 
572
            2>Committed revision 1.
 
573
            $ cd ..
 
574
            $ bzr init feature
 
575
            Created a standalone tree (format: 2a)
 
576
            $ cd feature
 
577
            $ bzr pull -v ../trunk -Olog_format=line
 
578
            Now on revision 1.
 
579
            Added Revisions:
 
580
            1: jrandom@example.com ...we need some foo
 
581
            2>+N  file
 
582
            2>All changes applied successfully.
 
583
            """)