Rev 3926: Tweaks from review for InterCHKRevisionTree. in file:///home/vila/src/bzr/experimental/brisbane-core/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon Apr 6 10:21:39 BST 2009


At file:///home/vila/src/bzr/experimental/brisbane-core/

------------------------------------------------------------
revno: 3926
revision-id: v.ladeuil+lp at free.fr-20090406092138-iolv6mhzki6fr2vd
parent: ian.clatworthy at canonical.com-20090403230524-m1ra52kq13vn7d3o
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: brisbane-core
timestamp: Mon 2009-04-06 11:21:38 +0200
message:
  Tweaks from review for InterCHKRevisionTree.
  
  * bzrlib/revisiontree.py:
  (InterCHKRevisionTree.iter_changes,not_achange): Deleted.
  
  * bzrlib/tests/intertree_implementations/__init__.py:
  (load_tests): Change InterCHKRevisionTree handling.
-------------- next part --------------
=== modified file 'bzrlib/revisiontree.py'
--- a/bzrlib/revisiontree.py	2009-03-30 11:49:32 +0000
+++ b/bzrlib/revisiontree.py	2009-04-06 09:21:38 +0000
@@ -24,6 +24,7 @@
     revision,
     symbol_versioning,
     tree,
+    workingtree, # needed for InterCHKRevisionTree tests :-/
     )
 
 
@@ -259,12 +260,6 @@
             # required to.
             # Now walk the whole inventory, excluding the already yielded
             # file ids
-            def not_a_change(file_id, relpath, parent, kind, executable):
-                return (file_id,
-                        (relpath, relpath), # Not renamed
-                        False, # Not modified
-                        (True, True), # Still  versioned
-                        (executable, executable))
             changed_file_ids = set(changed_file_ids)
             for relpath, entry in self.target.inventory.iter_entries():
                 if (specific_file_ids is not None

=== modified file 'bzrlib/tests/intertree_implementations/__init__.py'
--- a/bzrlib/tests/intertree_implementations/__init__.py	2009-03-30 11:49:32 +0000
+++ b/bzrlib/tests/intertree_implementations/__init__.py	2009-04-06 09:21:38 +0000
@@ -129,13 +129,22 @@
         ])
     test_intertree_permutations = [
         # test InterTree with two default-format working trees.
-        (InterTree.__name__, InterTree, default_tree_format, default_tree_format,
+        (InterTree.__name__, InterTree,
+         default_tree_format, default_tree_format,
          return_provided_trees)]
     for optimiser in InterTree._optimisers:
         if optimiser is revisiontree.InterCHKRevisionTree:
             # XXX: we shouldn't use an Intertree object to detect inventories
             # -- vila 20090311
-            continue
+            chk_tree_format = WorkingTreeFormat4()
+            chk_tree_format._get_matchingbzrdir = \
+                lambda:bzrlib.bzrdir.format_registry.make_bzrdir('development5')
+            test_intertree_permutations.append(
+                (InterTree.__name__ + "(CHKInventory)",
+                 InterTree,
+                 chk_tree_format,
+                 chk_tree_format,
+                 mutable_trees_to_revision_trees))
         elif optimiser is bzrlib.workingtree_4.InterDirStateTree:
             # Its a little ugly to be conditional here, but less so than having
             # the optimiser listed twice.
@@ -167,16 +176,6 @@
          default_tree_format,
          default_tree_format,
          mutable_trees_to_preview_trees))
-    # CHKInventory does not have an InterTree optimiser class (yet).
-    chk_tree_format = WorkingTreeFormat4()
-    chk_tree_format._get_matchingbzrdir = \
-        lambda:bzrlib.bzrdir.format_registry.make_bzrdir('development5')
-    test_intertree_permutations.append(
-        (InterTree.__name__ + "(CHKInventory)",
-         InterTree,
-         chk_tree_format,
-         chk_tree_format,
-         mutable_trees_to_revision_trees))
     scenarios = make_scenarios(
         default_transport,
         # None here will cause a readonly decorator to be created



More information about the bazaar-commits mailing list