446
446
return [('unversion', 'file-id')]
448
448
def check_file_doesnt_exist(self):
449
self.failIfExists('branch/file')
449
self.assertPathDoesNotExist('branch/file')
451
451
def do_create_file_in_dir(self):
452
452
return [('add', ('dir', 'dir-id', 'directory', '')),
459
459
self.assertFileEqual('trunk content\nmore content\n', 'branch/dir/file')
461
461
def check_file_in_dir_doesnt_exist(self):
462
self.failIfExists('branch/dir/file')
462
self.assertPathDoesNotExist('branch/dir/file')
464
464
def _get_resolve_path_arg(self, wt, action):
465
465
return self._path
540
540
return [('rename', ('file', 'new-file'))]
542
542
def check_file_renamed(self):
543
self.failIfExists('branch/file')
544
self.failUnlessExists('branch/new-file')
543
self.assertPathDoesNotExist('branch/file')
544
self.assertPathExists('branch/new-file')
546
546
def do_rename_file2(self):
547
547
return [('rename', ('file', 'new-file2'))]
549
549
def check_file_renamed2(self):
550
self.failIfExists('branch/file')
551
self.failUnlessExists('branch/new-file2')
550
self.assertPathDoesNotExist('branch/file')
551
self.assertPathExists('branch/new-file2')
553
553
def do_rename_dir(self):
554
554
return [('rename', ('dir', 'new-dir'))]
556
556
def check_dir_renamed(self):
557
self.failIfExists('branch/dir')
558
self.failUnlessExists('branch/new-dir')
557
self.assertPathDoesNotExist('branch/dir')
558
self.assertPathExists('branch/new-dir')
560
560
def do_rename_dir2(self):
561
561
return [('rename', ('dir', 'new-dir2'))]
563
563
def check_dir_renamed2(self):
564
self.failIfExists('branch/dir')
565
self.failUnlessExists('branch/new-dir2')
564
self.assertPathDoesNotExist('branch/dir')
565
self.assertPathExists('branch/new-dir2')
567
567
def do_delete_file(self):
568
568
return [('unversion', 'file-id')]
570
570
def check_file_doesnt_exist(self):
571
self.failIfExists('branch/file')
571
self.assertPathDoesNotExist('branch/file')
573
573
def do_delete_dir(self):
574
574
return [('unversion', 'dir-id')]
576
576
def check_dir_doesnt_exist(self):
577
self.failIfExists('branch/dir')
577
self.assertPathDoesNotExist('branch/dir')
579
579
def do_create_file_in_dir(self):
580
580
return [('add', ('dir', 'dir-id', 'directory', '')),
584
584
return [('rename', ('dir/file', 'dir/new-file'))]
586
586
def check_file_in_dir_renamed(self):
587
self.failIfExists('branch/dir/file')
588
self.failUnlessExists('branch/dir/new-file')
587
self.assertPathDoesNotExist('branch/dir/file')
588
self.assertPathExists('branch/dir/new-file')
590
590
def check_file_in_dir_doesnt_exist(self):
591
self.failIfExists('branch/dir/file')
591
self.assertPathDoesNotExist('branch/dir/file')
593
593
def _get_resolve_path_arg(self, wt, action):
594
594
tpath = self._this['path']
885
885
return [('rename', ('dir1', 'dir2/dir1'))]
887
887
def check_dir1_moved(self):
888
self.failIfExists('branch/dir1')
889
self.failUnlessExists('branch/dir2/dir1')
888
self.assertPathDoesNotExist('branch/dir1')
889
self.assertPathExists('branch/dir2/dir1')
891
891
def do_move_dir2_into_dir1(self):
892
892
return [('rename', ('dir2', 'dir1/dir2'))]
894
894
def check_dir2_moved(self):
895
self.failIfExists('branch/dir2')
896
self.failUnlessExists('branch/dir1/dir2')
895
self.assertPathDoesNotExist('branch/dir2')
896
self.assertPathExists('branch/dir1/dir2')
898
898
def do_create_dir1_4(self):
899
899
return [('add', ('dir1', 'dir1-id', 'directory', '')),
905
905
return [('rename', ('dir1', 'dir3/dir4/dir1'))]
907
907
def check_dir1_2_moved(self):
908
self.failIfExists('branch/dir1')
909
self.failUnlessExists('branch/dir3/dir4/dir1')
910
self.failUnlessExists('branch/dir3/dir4/dir1/dir2')
908
self.assertPathDoesNotExist('branch/dir1')
909
self.assertPathExists('branch/dir3/dir4/dir1')
910
self.assertPathExists('branch/dir3/dir4/dir1/dir2')
912
912
def do_move_dir3_into_dir2(self):
913
913
return [('rename', ('dir3', 'dir1/dir2/dir3'))]
915
915
def check_dir3_4_moved(self):
916
self.failIfExists('branch/dir3')
917
self.failUnlessExists('branch/dir1/dir2/dir3')
918
self.failUnlessExists('branch/dir1/dir2/dir3/dir4')
916
self.assertPathDoesNotExist('branch/dir3')
917
self.assertPathExists('branch/dir1/dir2/dir3')
918
self.assertPathExists('branch/dir1/dir2/dir3/dir4')
920
920
def _get_resolve_path_arg(self, wt, action):
921
921
# ParentLoop says: moving <conflict_path> into <path>. Cancelled move.