/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_pull.py

(John Arbash Meinel) Change Branch.pull() so it doesn't have to
        search all history all the time.

Show diffs side-by-side

added added

removed removed

Lines of Context:
88
88
        tree_a.commit('message 2', rev_id='rev2a')
89
89
        tree_b.commit('message 2', rev_id='rev2b')
90
90
        self.assertRaises(errors.DivergedBranches, tree_a.pull, tree_b.branch)
 
91
        self.assertRaises(errors.DivergedBranches,
 
92
                          tree_a.branch.pull, tree_b.branch,
 
93
                          overwrite=False, stop_revision='rev2b')
 
94
        # It should not have updated the branch tip, but it should have fetched
 
95
        # the revision
 
96
        self.assertEqual('rev2a', tree_a.branch.last_revision())
 
97
        self.assertTrue(tree_a.branch.repository.has_revision('rev2b'))
91
98
        tree_a.branch.pull(tree_b.branch, overwrite=True,
92
99
                           stop_revision='rev2b')
93
100
        self.assertEqual('rev2b', tree_a.branch.last_revision())