~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-09-25 23:58:12 UTC
  • mto: This revision was merged to the branch mainline in revision 6216.
  • Revision ID: jelmer@samba.org-20110925235812-c35izhdesn8rg0l5
More fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    def test_pull(self):
54
54
        """Pull changes from one branch to another."""
55
55
        a_tree = self.example_branch('a')
 
56
        base_rev = a_tree.branch.last_revision()
56
57
        os.chdir('a')
57
58
        self.run_bzr('pull', retcode=3)
58
59
        self.run_bzr('missing', retcode=3)
71
72
        self.run_bzr('pull')
72
73
        os.mkdir('subdir')
73
74
        b_tree.add('subdir')
74
 
        b_tree.commit(message='blah', allow_pointless=True)
 
75
        new_rev = b_tree.commit(message='blah', allow_pointless=True)
75
76
 
76
77
        os.chdir('..')
77
78
        a = Branch.open('a')
78
79
        b = Branch.open('b')
79
 
        self.assertEqual(a.revision_history(), b.revision_history()[:-1])
 
80
        self.assertEqual(a.last_revision(), base_rev)
 
81
        self.assertEqual(b.last_revision(), new_rev)
80
82
 
81
83
        os.chdir('a')
82
84
        self.run_bzr('pull ../b')
219
221
        a_tree.commit(message='a fourth change')
220
222
 
221
223
        rev_info_a = a_tree.branch.last_revision_info()
222
 
        self.assertEqual(rev_history_a[0], 4)
 
224
        self.assertEqual(rev_info_a[0], 4)
223
225
 
224
226
        # With convergence, we could just pull over the
225
227
        # new change, but with --overwrite, we want to switch our history