/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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-03-01 03:19:00 UTC
  • mfrom: (1551.10.23 Aaron's mergeable stuff)
  • Revision ID: pqm@pqm.ubuntu.com-20070301031900-28686aef0de59e43
fix pull --overwrite, especially with bundles

Show diffs side-by-side

added added

removed removed

Lines of Context:
80
80
        self.assertRaises(errors.BoundBranchConnectionFailure,
81
81
                checkout.branch.pull, other.branch)
82
82
 
 
83
    def test_pull_overwrite(self):
 
84
        tree_a = self.make_branch_and_tree('tree_a')
 
85
        tree_a.commit('message 1')
 
86
        tree_b = tree_a.bzrdir.sprout('tree_b').open_workingtree()
 
87
        tree_a.commit('message 2', rev_id='rev2a')
 
88
        tree_b.commit('message 2', rev_id='rev2b')
 
89
        self.assertRaises(errors.DivergedBranches, tree_a.pull, tree_b.branch)
 
90
        tree_a.branch.pull(tree_a.branch, overwrite=True,
 
91
                           stop_revision='rev2b')
 
92
        self.assertEqual('rev2b', tree_a.branch.last_revision())
 
93
        self.assertEqual(tree_b.branch.revision_history(),
 
94
                         tree_a.branch.revision_history())
 
95
 
83
96
 
84
97
class TestPullHook(TestCaseWithBranch):
85
98