~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge HEAD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
17
17
 
18
18
 
19
 
"""Black-box tests for bzr push.
20
 
"""
 
19
"""Black-box tests for bzr push."""
21
20
 
22
21
import os
23
22
 
 
23
import bzrlib
24
24
from bzrlib.branch import Branch
25
25
from bzrlib.osutils import abspath
26
26
from bzrlib.tests.blackbox import ExternalBase
71
71
        self.runbzr('push ../branch_c --remember')
72
72
        self.assertEquals(abspath(branch_a.get_push_location()),
73
73
                          abspath(branch_c.bzrdir.root_transport.base))
 
74
    
 
75
    def test_push_without_tree(self):
 
76
        # bzr push from a branch that does not have a checkout should work.
 
77
        b = self.make_branch('.')
 
78
        out, err = self.run_bzr('push', 'pushed-location')
 
79
        self.assertEqual('', out)
 
80
        self.assertEqual('0 revision(s) pushed.\n', err)
 
81
        b2 = bzrlib.branch.Branch.open('pushed-location')
 
82
        self.assertEndsWith(b2.base, 'pushed-location/')