94
94
# this line is more of a working tree test line, but - what the hey,
95
95
# it has work to do.
96
96
b_child.bzrdir.open_workingtree().update()
97
self.failUnlessExists('child/a')
98
self.failUnlessExists('child/b')
97
self.assertPathExists('child/a')
98
self.assertPathExists('child/b')
101
101
self.assertEqual(None, b_child.get_bound_location())
150
150
# TestCaseWithSFTPServer only allows you to connect one time
151
151
# to the SFTP server. So we have to create a connection and
152
152
# keep it around, so that it can be reused
153
__unused_t = transport.get_transport(self.get_url('.'))
153
__unused_t = self.get_transport()
155
155
wt_base = b_base.bzrdir.open_workingtree()
156
156
open('base/a', 'wb').write('new base contents\n')
292
292
wt_other.add('c')
293
293
wt_other.commit('adding c', rev_id='r@d-2')
295
self.failIf(wt_child.branch.repository.has_revision('r@d-2'))
296
self.failIf(b_base.repository.has_revision('r@d-2'))
295
self.assertFalse(wt_child.branch.repository.has_revision('r@d-2'))
296
self.assertFalse(b_base.repository.has_revision('r@d-2'))
298
298
wt_child.merge_from_branch(wt_other.branch)
300
self.failUnlessExists('child/c')
300
self.assertPathExists('child/c')
301
301
self.assertEqual(['r@d-2'], wt_child.get_parent_ids()[1:])
302
self.failUnless(wt_child.branch.repository.has_revision('r@d-2'))
303
self.failIf(b_base.repository.has_revision('r@d-2'))
302
self.assertTrue(wt_child.branch.repository.has_revision('r@d-2'))
303
self.assertFalse(b_base.repository.has_revision('r@d-2'))
305
305
# Commit should succeed, and cause merged revisions to
306
306
# be pushed into base
307
307
wt_child.commit('merge other', rev_id='r@c-2')
308
308
self.assertEqual(['r@b-1', 'r@c-2'], wt_child.branch.revision_history())
309
309
self.assertEqual(['r@b-1', 'r@c-2'], b_base.revision_history())
310
self.failUnless(b_base.repository.has_revision('r@d-2'))
310
self.assertTrue(b_base.repository.has_revision('r@d-2'))
312
312
def test_commit_fails(self):
313
313
b_base, wt_child = self.create_branches()