93
93
self.assertEqual('w', tree.branch._lock_mode)
95
95
self.assertEqual(None, tree.branch._lock_count)
97
def get_pullable_branches(self):
98
self.build_tree(['from/', 'from/file', 'to/'])
99
br_a = Branch.initialize('from')
101
br_a.commit('foo', rev_id='A')
102
br_b = Branch.initialize('to')
106
br_a, br_b = self.get_pullable_branches()
107
br_b.working_tree().pull(br_a)
108
self.failUnless(br_b.has_revision('A'))
109
self.assertEqual(['A'], br_b.revision_history())
111
def test_pull_clobbers(self):
112
br_a, br_b = self.get_pullable_branches()
113
br_b.commit('foo', rev_id='B')
114
self.assertEqual(['B'], br_b.revision_history())
115
br_b.working_tree().pull(br_a, clobber=True)
116
self.failUnless(br_b.has_revision('A'))
117
self.failUnless(br_b.has_revision('B'))
118
self.assertEqual(['A'], br_b.revision_history())