/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: John Arbash Meinel
  • Date: 2008-06-07 22:15:25 UTC
  • mto: This revision was merged to the branch mainline in revision 3487.
  • Revision ID: john@arbash-meinel.com-20080607221525-jfarlas0hrdt3r9m
Fix bug #238149, RemoteBranch.pull needs to return the _real_branch's pull result.

The test won't actually test the fix until bug #238227 is closed.

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
        import pdb; pdb.set_trace()
 
86
        parent = self.make_branch_and_tree('parent')
 
87
        parent.commit('1st post', rev_id='P1')
 
88
        mine = parent.bzrdir.sprout('mine').open_workingtree()
 
89
        mine.commit('my change', rev_id='M1')
 
90
        result = parent.branch.pull(mine.branch)
 
91
        self.assertIsNot(None, result)
 
92
        self.assertIs(mine.branch, result.source_branch)
 
93
        self.assertIs(parent.branch, result.target_branch)
 
94
        self.assertIs(parent.branch, result.master_branch)
 
95
        self.assertIs(None, result.local_branch)
 
96
        self.assertEqual(1, result.old_revno)
 
97
        self.assertEqual('P1', result.old_revid)
 
98
        self.assertEqual(2, result.new_revno)
 
99
        self.assertEqual('M1', result.new_revid)
 
100
        self.assertEqual(None, result.tag_conflicts)
 
101
 
84
102
    def test_pull_overwrite(self):
85
103
        tree_a = self.make_branch_and_tree('tree_a')
86
104
        tree_a.commit('message 1')