~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_conflicts.py

  • Committer: Vincent Ladeuil
  • Date: 2011-10-27 15:38:14 UTC
  • mfrom: (6015.44.4 2.4)
  • mto: This revision was merged to the branch mainline in revision 6236.
  • Revision ID: v.ladeuil+lp@free.fr-20111027153814-0r4nd2io1jv6t47f
Merge 2.4 into trunk including fix for bug #880701

Show diffs side-by-side

added added

removed removed

Lines of Context:
677
677
             ('fileb_created',
678
678
              dict(actions='create_file_b', check='file_content_b',
679
679
                   path='file', file_id='file-b-id')),),
 
680
            # File created with different file-ids but deleted on one side
 
681
            (dict(_base_actions='create_file_a'),
 
682
             ('filea_replaced',
 
683
              dict(actions='replace_file_a_by_b', check='file_content_b',
 
684
                   path='file', file_id='file-b-id')),
 
685
             ('filea_modified',
 
686
              dict(actions='modify_file_a', check='file_new_content',
 
687
                   path='file', file_id='file-a-id')),),
680
688
            ])
681
689
 
682
690
    def do_nothing(self):
694
702
    def check_file_content_b(self):
695
703
        self.assertFileEqual('file b content\n', 'branch/file')
696
704
 
 
705
    def do_replace_file_a_by_b(self):
 
706
        return [('unversion', 'file-a-id'),
 
707
                ('add', ('file', 'file-b-id', 'file', 'file b content\n'))]
 
708
 
 
709
    def do_modify_file_a(self):
 
710
        return [('modify', ('file-a-id', 'new content\n'))]
 
711
 
 
712
    def check_file_new_content(self):
 
713
        self.assertFileEqual('new content\n', 'branch/file')
 
714
 
697
715
    def _get_resolve_path_arg(self, wt, action):
698
716
        return self._this['path']
699
717
 
1043
1061
        # This is nearly like TestResolveNonDirectoryParent but with branch and
1044
1062
        # trunk switched. As such it should certainly produce the same
1045
1063
        # conflict.
1046
 
        self.run_script("""
 
1064
        self.assertRaises(errors.MalformedTransform,
 
1065
                          self.run_script,"""
1047
1066
$ bzr init trunk
1048
1067
...
1049
1068
$ cd trunk