~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
"""Black-box tests for bzr dpush."""
19
19
 
20
20
 
21
 
import os
22
 
 
23
21
from bzrlib import (
24
 
    branch,
25
 
    bzrdir,
26
 
    foreign,
27
22
    tests,
28
 
    workingtree,
29
23
    )
30
24
from bzrlib.tests import (
31
 
    blackbox,
32
25
    script,
33
26
    test_foreign,
34
27
    )
60
53
        source_tree = self.make_branch_and_tree("dc")
61
54
        output, error = self.run_bzr("dpush -d dc dp", retcode=3)
62
55
        self.assertEquals("", output)
63
 
        self.assertContainsRe(error, 'in the same VCS, lossy push not necessary. Please use regular push.')
 
56
        self.assertContainsRe(error,
 
57
            'in the same VCS, lossy push not necessary. Please use regular '
 
58
            'push.')
64
59
 
65
60
    def test_dpush(self):
66
61
        branch = self.make_dummy_builder('d').get_branch()
71
66
 
72
67
        script.run_script(self, """
73
68
            $ bzr dpush -d dc d
 
69
            2>Doing on-the-fly conversion from DummyForeignVcsRepositoryFormat() to RepositoryFormat2a().
 
70
            2>This may take some time. Upgrade the repositories to the same format for better performance.
74
71
            2>Pushed up to revision 2.
75
72
            $ bzr status dc
76
73
            """)
86
83
 
87
84
        script.run_script(self, '''
88
85
            $ bzr dpush -d dc d
 
86
            2>Doing on-the-fly conversion from DummyForeignVcsRepositoryFormat() to RepositoryFormat2a().
 
87
            2>This may take some time. Upgrade the repositories to the same format for better performance.
89
88
            2>Pushed up to revision 2.
90
89
            $ bzr revno dc
91
90
            2
104
103
        self.build_tree_contents([("dc/foofile", "blaaaal")])
105
104
        script.run_script(self, '''
106
105
            $ bzr dpush -d dc d --no-strict
 
106
            2>Doing on-the-fly conversion from DummyForeignVcsRepositoryFormat() to RepositoryFormat2a().
 
107
            2>This may take some time. Upgrade the repositories to the same format for better performance.
107
108
            2>Pushed up to revision 2.
108
109
            ''')
109
110
        self.assertFileEqual("blaaaal", "dc/foofile")