~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_shelf_ui.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
302
302
        finally:
303
303
            tree.unlock()
304
304
 
305
 
    def test_shelve_old_root_deleted(self):
 
305
    def test_shelve_old_root_preserved(self):
306
306
        tree1 = self.make_branch_and_tree('tree1')
307
307
        tree1.commit('add root')
 
308
        tree1_root_id = tree1.get_root_id()
308
309
        tree2 = self.make_branch_and_tree('tree2')
309
310
        rev2 = tree2.commit('add root')
 
311
        self.assertNotEquals(tree1_root_id, tree2.get_root_id())
310
312
        tree1.merge_from_branch(tree2.branch,
311
313
                                from_revision=revision.NULL_REVISION)
312
 
        tree1.commit('Replaced root entry')
 
314
        tree1.commit('merging in tree2')
 
315
        self.assertEquals(tree1_root_id, tree1.get_root_id())
313
316
        # This is essentially assertNotRaises(InconsistentDelta)
314
 
        # With testtools 0.99, it can be rewritten as:
 
317
        # With testtools 0.9.9, it can be rewritten as:
315
318
        # with ExpectedException(AssertionError,
316
319
        #                        'InconsistentDelta not raised'):
317
320
        #     with ExpectedException(errors.InconsistentDelta, ''):