~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: 2010-05-14 16:01:31 UTC
  • mfrom: (5234.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100514160131-h02nbvcnwi2o80nw
(vila, mgz) Blue babune for win32 !

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    )
30
30
from bzrlib.tests import (
31
31
    blackbox,
32
 
    script,
33
32
    test_foreign,
34
33
    )
35
34
from bzrlib.tests.blackbox import test_push
59
58
    return result
60
59
 
61
60
 
62
 
class TestDpush(tests.TestCaseWithTransport):
 
61
class TestDpush(blackbox.ExternalBase):
63
62
 
64
63
    def setUp(self):
65
64
        super(TestDpush, self).setUp()
87
86
        self.build_tree(("dc/foo", "blaaaa"))
88
87
        dc.open_workingtree().commit('msg')
89
88
 
90
 
        script.run_script(self, """
91
 
            $ bzr dpush -d dc d
92
 
            2>Pushed up to revision 2.
93
 
            $ bzr status dc
94
 
            """)
 
89
        output, error = self.run_bzr("dpush -d dc d")
 
90
        self.assertEquals(error, "Pushed up to revision 2.\n")
 
91
        self.check_output("", "status dc")
95
92
 
96
93
    def test_dpush_new(self):
97
94
        b = self.make_dummy_builder('d').get_branch()
102
99
        dc_tree.add("foofile")
103
100
        dc_tree.commit("msg")
104
101
 
105
 
        script.run_script(self, '''
106
 
            $ bzr dpush -d dc d
107
 
            $ bzr revno dc
108
 
            2
109
 
            $ bzr status dc
110
 
            ''')
 
102
        self.check_output("", "dpush -d dc d")
 
103
        self.check_output("2\n", "revno dc")
 
104
        self.check_output("", "status dc")
111
105
 
112
106
    def test_dpush_wt_diff(self):
113
107
        b = self.make_dummy_builder('d').get_branch()
119
113
        newrevid = dc_tree.commit('msg')
120
114
 
121
115
        self.build_tree_contents([("dc/foofile", "blaaaal")])
122
 
        script.run_script(self, '''
123
 
            $ bzr dpush -d dc d --no-strict
124
 
            ''')
 
116
        self.check_output("", "dpush -d dc d --no-strict")
125
117
        self.assertFileEqual("blaaaal", "dc/foofile")
126
118
        # if the dummy vcs wasn't that dummy we could uncomment the line below
127
119
        # self.assertFileEqual("blaaaa", "d/foofile")
128
 
        script.run_script(self, '''
129
 
            $ bzr status dc
130
 
            modified:
131
 
              foofile
132
 
            ''')
 
120
        self.check_output('modified:\n  foofile\n', "status dc")
133
121
 
134
122
    def test_diverged(self):
135
123
        builder = self.make_dummy_builder('d')