~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Jonathan Riddell
  • Date: 2011-06-30 11:14:06 UTC
  • mfrom: (6002 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6003.
  • Revision ID: jriddell@canonical.com-20110630111406-eimf301w6x92xkk7
mergeĀ inĀ trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
291
291
        transform.fixup_new_roots()
292
292
        self.assertNotIn(transform.root, transform._new_id)
293
293
 
 
294
    def test_remove_root_fixup(self):
 
295
        transform, root = self.get_transform()
 
296
        old_root_id = self.wt.get_root_id()
 
297
        self.assertNotEqual('new-root-id', old_root_id)
 
298
        transform.delete_contents(root)
 
299
        transform.unversion_file(root)
 
300
        transform.fixup_new_roots()
 
301
        transform.apply()
 
302
        self.assertEqual(old_root_id, self.wt.get_root_id())
 
303
 
 
304
        transform, root = self.get_transform()
 
305
        new_trans_id = transform.new_directory('', ROOT_PARENT, 'new-root-id')
 
306
        new_trans_id = transform.new_directory('', ROOT_PARENT, 'alt-root-id')
 
307
        self.assertRaises(ValueError, transform.fixup_new_roots)
 
308
 
294
309
    def test_apply_retains_root_directory(self):
295
310
        # Do not attempt to delete the physical root directory, because that
296
311
        # is impossible.