~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-04-16 01:09:56 UTC
  • mfrom: (5784.1.4 760435-less-fail)
  • Revision ID: pqm@pqm.ubuntu.com-20110416010956-5wrpm136qq2hz5f3
(mbp) rename and deprecate failUnlessExists and failIfExists (Martin Pool)

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
 
21
23
from bzrlib import (
 
24
    branch,
 
25
    bzrdir,
 
26
    foreign,
22
27
    tests,
 
28
    workingtree,
23
29
    )
24
30
from bzrlib.tests import (
 
31
    blackbox,
25
32
    script,
26
33
    test_foreign,
27
34
    )
53
60
        source_tree = self.make_branch_and_tree("dc")
54
61
        output, error = self.run_bzr("dpush -d dc dp", retcode=3)
55
62
        self.assertEquals("", output)
56
 
        self.assertContainsRe(error,
57
 
            'in the same VCS, lossy push not necessary. Please use regular '
58
 
            'push.')
 
63
        self.assertContainsRe(error, 'in the same VCS, lossy push not necessary. Please use regular push.')
59
64
 
60
65
    def test_dpush(self):
61
66
        branch = self.make_dummy_builder('d').get_branch()
66
71
 
67
72
        script.run_script(self, """
68
73
            $ 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.
71
74
            2>Pushed up to revision 2.
72
75
            $ bzr status dc
73
76
            """)
83
86
 
84
87
        script.run_script(self, '''
85
88
            $ 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.
88
89
            2>Pushed up to revision 2.
89
90
            $ bzr revno dc
90
91
            2
103
104
        self.build_tree_contents([("dc/foofile", "blaaaal")])
104
105
        script.run_script(self, '''
105
106
            $ 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.
108
107
            2>Pushed up to revision 2.
109
108
            ''')
110
109
        self.assertFileEqual("blaaaal", "dc/foofile")