~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_conflicts.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-28 12:18:33 UTC
  • mfrom: (5988.2.3 688101-duplicate-ids)
  • Revision ID: pqm@pqm.ubuntu.com-20110628121833-ax14ogkh8ks922nu
(vila) Do not generate path conflicts if a corresponding content conflict
 exists. (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
446
446
              dict(actions='modify_file', check='file_has_more_content')),
447
447
             ('file_deleted',
448
448
              dict(actions='delete_file', check='file_doesnt_exist')),),
 
449
            # File renamed-modified/deleted
 
450
            (dict(_base_actions='create_file',
 
451
                  _path='new-file', _file_id='file-id'),
 
452
             ('file_renamed_and_modified',
 
453
              dict(actions='modify_and_rename_file',
 
454
                   check='file_renamed_and_more_content')),
 
455
             ('file_deleted',
 
456
              dict(actions='delete_file', check='file_doesnt_exist')),),
449
457
            # File modified/deleted in dir
450
458
            (dict(_base_actions='create_file_in_dir',
451
459
                  _path='dir/file', _file_id='file-id'),
463
471
    def do_modify_file(self):
464
472
        return [('modify', ('file-id', 'trunk content\nmore content\n'))]
465
473
 
 
474
    def do_modify_and_rename_file(self):
 
475
        return [('modify', ('file-id', 'trunk content\nmore content\n')),
 
476
                ('rename', ('file', 'new-file'))]
 
477
 
466
478
    def check_file_has_more_content(self):
467
479
        self.assertFileEqual('trunk content\nmore content\n', 'branch/file')
468
480
 
 
481
    def check_file_renamed_and_more_content(self):
 
482
        self.assertFileEqual('trunk content\nmore content\n', 'branch/new-file')
 
483
 
469
484
    def do_delete_file(self):
470
485
        return [('unversion', 'file-id')]
471
486