Rev 6058: Failing tests reproducing bug #880701. in file:///home/vila/src/bzr/bugs/880701-resolve-duplicate/

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Oct 26 15:22:25 UTC 2011


At file:///home/vila/src/bzr/bugs/880701-resolve-duplicate/

------------------------------------------------------------
revno: 6058
revision-id: v.ladeuil+lp at free.fr-20111026152224-mpk1o7wpz6qbpm5p
parent: v.ladeuil+lp at free.fr-20111026152129-jqfkx8zl3g0735f7
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: 880701-resolve-duplicate
timestamp: Wed 2011-10-26 17:22:24 +0200
message:
  Failing tests reproducing bug #880701.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_conflicts.py'
--- a/bzrlib/tests/test_conflicts.py	2011-10-24 15:15:09 +0000
+++ b/bzrlib/tests/test_conflicts.py	2011-10-26 15:22:24 +0000
@@ -677,6 +677,14 @@
              ('fileb_created',
               dict(actions='create_file_b', check='file_content_b',
                    path='file', file_id='file-b-id')),),
+            # File created with different file-ids but deleted on one side
+            (dict(_base_actions='create_file_a'),
+             ('filea_replaced',
+              dict(actions='replace_file_a_by_b', check='file_content_b',
+                   path='file', file_id='file-b-id')),
+             ('filea_modified',
+              dict(actions='modify_file_a', check='file_new_content',
+                   path='file', file_id='file-a-id')),),
             ])
 
     def do_nothing(self):
@@ -694,6 +702,16 @@
     def check_file_content_b(self):
         self.assertFileEqual('file b content\n', 'branch/file')
 
+    def do_replace_file_a_by_b(self):
+        return [('unversion', 'file-a-id'),
+                ('add', ('file', 'file-b-id', 'file', 'file b content\n'))]
+
+    def do_modify_file_a(self):
+        return [('modify', ('file-a-id', 'new content\n'))]
+
+    def check_file_new_content(self):
+        self.assertFileEqual('new content\n', 'branch/file')
+
     def _get_resolve_path_arg(self, wt, action):
         return self._this['path']
 



More information about the bazaar-commits mailing list