Rev 4622: Reproduce bug #529968. in file:///home/vila/src/bzr/experimental/conflict-manager/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Mar 1 13:55:49 GMT 2010


At file:///home/vila/src/bzr/experimental/conflict-manager/

------------------------------------------------------------
revno: 4622
revision-id: v.ladeuil+lp at free.fr-20100301135549-gxwcs9fyk4t8fitb
parent: v.ladeuil+lp at free.fr-20100228135803-yrsc4pu9e4bvbf1h
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: cleanup
timestamp: Mon 2010-03-01 14:55:49 +0100
message:
  Reproduce bug #529968.
  
  * bzrlib/tests/test_conflicts.py:
  (OldTestResolveContentConflicts): Remove blackbox tests.
  (TestResolveContentConflicts.test_resolve_taking_this): Ensure we
  end up with the right path for the file when the conflict is
  resolved.
  (TestResolveContentConflicts.test_resolve_taking_other): Ensure we
  end up with no file after the conflict is resolved.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_conflicts.py'
--- a/bzrlib/tests/test_conflicts.py	2010-02-28 13:58:03 +0000
+++ b/bzrlib/tests/test_conflicts.py	2010-03-01 13:55:49 +0000
@@ -196,6 +196,9 @@
 
 class TestResolveContentConflicts(tests.TestCaseWithTransport):
 
+    # FIXME: We need to add the reverse case (delete in trunk, modify in
+    # branch) but that could wait until the resolution mechanism is implemented.
+
     def setUp(self):
         super(TestResolveContentConflicts, self).setUp()
         builder = self.make_branch_builder('trunk')
@@ -241,67 +244,14 @@
         self.assertConflict(wt, conflicts.ContentsConflict,
                             path='file', file_id='file-id',)
         self.assertResolved(wt, 'file', 'take_this')
+        self.assertFileEqual('trunk content\nmore content\n', 'branch/file')
 
     def test_resolve_taking_other(self):
         wt = self._merge_other_into_this()
         self.assertConflict(wt, conflicts.ContentsConflict,
                             path='file', file_id='file-id',)
         self.assertResolved(wt, 'file', 'take_other')
-
-
-class OldTestResolveContentConflicts(TestResolveConflicts):
-
-    # FIXME: We need to add the reverse case (delete in trunk, modify in
-    # branch) but that could wait until the resolution mechanism is implemented.
-
-    preamble = """
-$ bzr init trunk
-$ cd trunk
-$ echo 'trunk content' >file
-$ bzr add file
-$ bzr commit -m 'Create trunk'
-
-$ bzr branch . ../branch
-$ cd ../branch
-$ bzr rm file
-$ bzr commit -m 'Delete file'
-
-$ cd ../trunk
-$ echo 'more content' >>file
-$ bzr commit -m 'Modify file'
-
-$ cd ../branch
-$ bzr merge ../trunk
-2>+N  file.OTHER
-2>Contents conflict in file
-2>1 conflicts encountered.
-"""
-
-    def test_take_this(self):
-        self.run_script("""
-$ bzr rm file.OTHER --force # a simple rm file.OTHER is valid too
-$ bzr resolve file
-$ bzr commit --strict -m 'No more conflicts nor unknown files'
-""")
-
-    def test_take_other(self):
-        self.run_script("""
-$ bzr mv file.OTHER file
-$ bzr resolve file
-$ bzr commit --strict -m 'No more conflicts nor unknown files'
-""")
-
-    def test_resolve_taking_this(self):
-        self.run_script("""
-$ bzr resolve --take-this file
-$ bzr commit --strict -m 'No more conflicts nor unknown files'
-""")
-
-    def test_resolve_taking_other(self):
-        self.run_script("""
-$ bzr resolve --take-other file
-$ bzr commit --strict -m 'No more conflicts nor unknown files'
-""")
+        self.failIfExists('branch/file')
 
 
 class TestResolveDuplicateEntry(TestResolveConflicts):



More information about the bazaar-commits mailing list