~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2011-09-26 15:42:24 UTC
  • mfrom: (6165.2.3 avoid-revision-history)
  • Revision ID: pqm@pqm.ubuntu.com-20110926154224-by4s1qzbroh115wn
(jelmer) Remove several calls to Branch.revision_history(). (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
        parent.merge_from_branch(mine.branch)
41
41
        parent.commit('merge my change', rev_id='P2')
42
42
        mine.pull(parent.branch)
43
 
        self.assertEqual(['P1', 'P2'], mine.branch.revision_history())
 
43
        self.assertEqual('P2', mine.branch.last_revision())
44
44
 
45
45
    def test_pull_merged_indirect(self):
46
46
        # it should be possible to do a pull from one branch into another
57
57
        parent.merge_from_branch(other.branch)
58
58
        parent.commit('merge other', rev_id='P2')
59
59
        mine.pull(parent.branch)
60
 
        self.assertEqual(['P1', 'P2'], mine.branch.revision_history())
 
60
        self.assertEqual('P2', mine.branch.last_revision())
61
61
 
62
62
    def test_pull_updates_checkout_and_master(self):
63
63
        """Pulling into a checkout updates the checkout and the master branch"""
68
68
        rev2 = other.commit('other commit')
69
69
        # now pull, which should update both checkout and master.
70
70
        checkout.branch.pull(other.branch)
71
 
        self.assertEqual([rev1, rev2], checkout.branch.revision_history())
72
 
        self.assertEqual([rev1, rev2], master_tree.branch.revision_history())
 
71
        self.assertEqual(rev2, checkout.branch.last_revision())
 
72
        self.assertEqual(rev2, master_tree.branch.last_revision())
73
73
 
74
74
    def test_pull_raises_specific_error_on_master_connection_error(self):
75
75
        master_tree = self.make_from_branch_and_tree('master')
116
116
        tree_a.branch.pull(tree_b.branch, overwrite=True,
117
117
                           stop_revision='rev2b')
118
118
        self.assertEqual('rev2b', tree_a.branch.last_revision())
119
 
        self.assertEqual(tree_b.branch.revision_history(),
120
 
                         tree_a.branch.revision_history())
 
119
        self.assertEqual(tree_b.branch.last_revision(),
 
120
                         tree_a.branch.last_revision())
121
121
 
122
122
 
123
123
class TestPullHook(TestCaseWithInterBranch):