Rev 3540: another test for only in OTHER in http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/merge_lca_multi

John Arbash Meinel john at arbash-meinel.com
Wed Jul 23 03:28:09 BST 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.7-dev/merge_lca_multi

------------------------------------------------------------
revno: 3540
revision-id: john at arbash-meinel.com-20080723022704-fgfvo8t4unyl14bw
parent: john at arbash-meinel.com-20080722231354-fem3xq4gkjusdf8j
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: merge_lca_multi
timestamp: Tue 2008-07-22 21:27:04 -0500
message:
  another test for only in OTHER
-------------- next part --------------
=== modified file 'bzrlib/tests/test_merge.py'
--- a/bzrlib/tests/test_merge.py	2008-07-22 23:13:54 +0000
+++ b/bzrlib/tests/test_merge.py	2008-07-23 02:27:04 +0000
@@ -1359,12 +1359,30 @@
                            ((False, [False, False]), None, False)),
                          ], entries)
 
+    def test_only_in_other(self):
+        builder = self.get_builder()
+        builder.build_snapshot('A-id', None,
+            [('add', (u'', 'a-root-id', 'directory', None))])
+        builder.build_snapshot('B-id', ['A-id'], [])
+        builder.build_snapshot('C-id', ['A-id'], [])
+        builder.build_snapshot('E-id', ['C-id', 'B-id'],
+            [('add', (u'a', 'a-id', 'file', 'a\nb\nc\n'))])
+        builder.build_snapshot('D-id', ['B-id', 'C-id'], [])
+        merge_obj = self.make_merge_obj(builder, 'E-id')
+
+        entries = list(merge_obj._entries_lca())
+        root_id = 'a-root-id'
+        self.assertEqual([('a-id', True,
+                           ((None, [None, None]), root_id, None),
+                           ((None, [None, None]), u'a', None),
+                           ((None, [None, None]), False, None)),
+                         ], entries)
     # TODO: cases to test
     #       simple criss-cross LCAS identical, BASE different
     #       x-x changed from BASE but identical for all LCAs and tips
     #               should be possible with the same trick of 'not-in-base'
-    #       x-x OTHER deletes the file
-    #       x-x OTHER introduces the file
+    #               using a double criss-cross
+    #       x-x Only renamed, no content or kind change
     #       x-x LCAs differ, one in ancestry of other for a given file
     #       x-x file missing in LCA
     #       x-x Reverted back to BASE text



More information about the bazaar-commits mailing list