~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_interbranch/test_push.py

  • Committer: Jelmer Vernooij
  • Date: 2011-10-04 14:08:14 UTC
  • mfrom: (6187 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6189.
  • Revision ID: jelmer@samba.org-20111004140814-cltag93d2l5j9zyf
MergeĀ lp:bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        mine.merge_from_branch(other.branch)
62
62
        mine.commit('merge my change', rev_id='P2')
63
63
        result = mine.branch.push(other.branch)
64
 
        self.assertEqual(['P1', 'P2'], other.branch.revision_history())
 
64
        self.assertEqual('P2', other.branch.last_revision())
65
65
        # result object contains some structured data
66
66
        self.assertEqual(result.old_revid, 'M1')
67
67
        self.assertEqual(result.new_revid, 'P2')
86
86
        mine.merge_from_branch(other.branch)
87
87
        mine.commit('merge other', rev_id='P2')
88
88
        mine.branch.push(target.branch)
89
 
        self.assertEqual(['P1', 'P2'], target.branch.revision_history())
 
89
        self.assertEqual('P2', target.branch.last_revision())
90
90
 
91
91
    def test_push_to_checkout_updates_master(self):
92
92
        """Pushing into a checkout updates the checkout and the master branch"""
104
104
        rev2 = other.commit('other commit')
105
105
        # now push, which should update both checkout and master.
106
106
        other.branch.push(checkout.branch)
107
 
        self.assertEqual([rev1, rev2], checkout.branch.revision_history())
108
 
        self.assertEqual([rev1, rev2], master_tree.branch.revision_history())
 
107
        self.assertEqual(rev2, checkout.branch.last_revision())
 
108
        self.assertEqual(rev2, master_tree.branch.last_revision())
109
109
 
110
110
    def test_push_raises_specific_error_on_master_connection_error(self):
111
111
        master_tree = self.make_to_branch_and_tree('master')