~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

Added file renaming test case

Show diffs side-by-side

added added

removed removed

Lines of Context:
343
343
        transform.version_file('new-root', new_root)
344
344
        transform.apply()
345
345
 
 
346
    def test_renames(self):
 
347
        create, root = self.get_transform()
 
348
        old = create.new_directory('old-parent', root, 'old-id')
 
349
        intermediate = create.new_directory('intermediate', old, 'im-id')
 
350
        myfile = create.new_file('myfile', intermediate, 'myfile-text',
 
351
                                 'myfile-id')
 
352
        create.apply()
 
353
        rename, root = self.get_transform()
 
354
        old = rename.get_trans_id('old-id')
 
355
        rename.adjust_path('new', root, old)
 
356
        myfile = rename.get_trans_id('myfile-id')
 
357
        rename.set_executability(True, myfile)
 
358
        rename.apply()
 
359
 
346
360
 
347
361
class TransformGroup(object):
348
362
    def __init__(self, dirname):