Rev 4680: The changes_from() implementation fails the include_parents test. in http://bazaar.launchpad.net/~jameinel/bzr/2.0.1-faster-get-deltas-bug374730

John Arbash Meinel john at arbash-meinel.com
Thu Sep 24 22:42:05 BST 2009


At http://bazaar.launchpad.net/~jameinel/bzr/2.0.1-faster-get-deltas-bug374730

------------------------------------------------------------
revno: 4680
revision-id: john at arbash-meinel.com-20090924214152-pv21z2k7a2uddy63
parent: john at arbash-meinel.com-20090924213240-o6rpr4xv64ruht98
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.0.1-faster-get-deltas-bug374730
timestamp: Thu 2009-09-24 16:41:52 -0500
message:
  The changes_from() implementation fails the include_parents test.
  The previous get_deltas_for_revisions() implementation would include
    mv foo bar
  if you did
    bzr log bar/file
  (It would show you changes to a parent dir, when logging a child.)
  It is arguable either way, but I think we want to preserve this behavior.
  
  Also note that this 'changes_from' implementation is taking 1m35s up from the 36s
  I was seeing with the simpler implementation.
  My guess is that the paths2ids overhead is significant.
-------------- next part --------------
=== modified file 'bzrlib/tests/per_repository/test_get_deltas_for_revisions.py'
--- a/bzrlib/tests/per_repository/test_get_deltas_for_revisions.py	2009-09-24 21:32:40 +0000
+++ b/bzrlib/tests/per_repository/test_get_deltas_for_revisions.py	2009-09-24 21:41:52 +0000
@@ -95,3 +95,12 @@
         # a child was modified in all but rev2
         self.assertEqual([True, False, True, True, True, True],
                          [d.has_changed() for d in deltas])
+
+    def test_filtered_includes_parents(self):
+        repo = self.make_repo_with_history()
+        revisions = [repo.get_revision(r) for r in
+                     ['rev1', 'rev2', 'rev3', 'rev4', 'rev5', 'rev6']]
+        deltas = list(repo.get_deltas_for_revisions(revisions,
+                      specific_fileids=['subsubfile-id']))
+        self.assertEqual([True, False, True, True, False, True],
+                         [d.has_changed() for d in deltas])



More information about the bazaar-commits mailing list