/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/blackbox/test_uncommit.py

Change all callers of set_last_revision to use set_parent_trees.

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
        a = BzrDirMetaFormat1().initialize('a')
91
91
        a.create_repository()
92
92
        a.create_branch()
93
 
        t = a.create_workingtree()
94
 
        t.commit('commit 1')
95
 
        t.commit('commit 2')
96
 
        t.commit('commit 3')
97
 
        b = t.bzrdir.sprout('b').open_branch()
98
 
        b.bind(t.branch)
 
93
        t_a = a.create_workingtree()
 
94
        t_a.commit('commit 1')
 
95
        t_a.commit('commit 2')
 
96
        t_a.commit('commit 3')
 
97
        b = t_a.bzrdir.sprout('b').open_branch()
 
98
        b.bind(t_a.branch)
99
99
        uncommit.uncommit(b)
100
 
        t.set_last_revision(t.branch.last_revision())
101
100
        self.assertEqual(len(b.revision_history()), 2)
102
 
        self.assertEqual(len(t.branch.revision_history()), 2)
103
 
        t.commit('commit 3b')
 
101
        self.assertEqual(len(t_a.branch.revision_history()), 2)
 
102
        # update A's tree to not have the uncomitted revision referenced.
 
103
        t_a.update()
 
104
        t_a.commit('commit 3b')
104
105
        self.assertRaises(BoundBranchOutOfDate, uncommit.uncommit, b)
105
 
        b.pull(t.branch)
 
106
        b.pull(t_a.branch)
106
107
        uncommit.uncommit(b)
107
108
 
108
109
    def test_uncommit_revision(self):