/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/per_branch/test_push.py

  • Committer: Jelmer Vernooij
  • Date: 2011-09-25 16:30:38 UTC
  • mto: This revision was merged to the branch mainline in revision 6216.
  • Revision ID: jelmer@samba.org-20110925163038-5lcgcizzj8hwlue4
Avoid .revision_history().

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
        mine.merge_from_branch(other.branch)
54
54
        mine.commit('merge my change', rev_id='P2')
55
55
        result = mine.branch.push(other.branch)
56
 
        self.assertEqual(['P1', 'P2'], other.branch.revision_history())
 
56
        self.assertEqual('P2', other.branch.last_revision())
57
57
        # result object contains some structured data
58
58
        self.assertEqual(result.old_revid, 'M1')
59
59
        self.assertEqual(result.new_revid, 'P2')
78
78
        mine.merge_from_branch(other.branch)
79
79
        mine.commit('merge other', rev_id='P2')
80
80
        mine.branch.push(target.branch)
81
 
        self.assertEqual(['P1', 'P2'], target.branch.revision_history())
 
81
        self.assertEqual('P2', target.branch.last_revision())
82
82
 
83
83
    def test_push_to_checkout_updates_master(self):
84
84
        """Pushing into a checkout updates the checkout and the master branch"""
95
95
        rev2 = other.commit('other commit')
96
96
        # now push, which should update both checkout and master.
97
97
        other.branch.push(checkout.branch)
98
 
        self.assertEqual([rev1, rev2], checkout.branch.revision_history())
99
 
        self.assertEqual([rev1, rev2], master_tree.branch.revision_history())
 
98
        self.assertEqual(rev2, checkout.branch.last_revision())
 
99
        self.assertEqual(rev2, master_tree.branch.last_revision())
100
100
 
101
101
    def test_push_raises_specific_error_on_master_connection_error(self):
102
102
        master_tree = self.make_branch_and_tree('master')