/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

Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
81
81
        self.assertRaises(errors.BoundBranchConnectionFailure,
82
82
                checkout.branch.pull, other.branch)
83
83
 
 
84
    def test_pull_returns_result(self):
 
85
        parent = self.make_branch_and_tree('parent')
 
86
        parent.commit('1st post', rev_id='P1')
 
87
        mine = parent.bzrdir.sprout('mine').open_workingtree()
 
88
        mine.commit('my change', rev_id='M1')
 
89
        result = parent.branch.pull(mine.branch)
 
90
        self.assertIsNot(None, result)
 
91
        self.assertIs(mine.branch, result.source_branch)
 
92
        self.assertIs(parent.branch, result.target_branch)
 
93
        self.assertIs(parent.branch, result.master_branch)
 
94
        self.assertIs(None, result.local_branch)
 
95
        self.assertEqual(1, result.old_revno)
 
96
        self.assertEqual('P1', result.old_revid)
 
97
        self.assertEqual(2, result.new_revno)
 
98
        self.assertEqual('M1', result.new_revid)
 
99
        self.assertEqual(None, result.tag_conflicts)
 
100
 
84
101
    def test_pull_overwrite(self):
85
102
        tree_a = self.make_branch_and_tree('tree_a')
86
103
        tree_a.commit('message 1')