~jameinel/bzr/2.0.1-faster-get-deltas-bug374730

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_repository/test_get_deltas_for_revisions.py

  • Committer: John Arbash Meinel
  • Date: 2009-09-24 21:41:52 UTC
  • Revision ID: john@arbash-meinel.com-20090924214152-pv21z2k7a2uddy63
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.

Show diffs side-by-side

added added

removed removed

Lines of Context:
95
95
        # a child was modified in all but rev2
96
96
        self.assertEqual([True, False, True, True, True, True],
97
97
                         [d.has_changed() for d in deltas])
 
98
 
 
99
    def test_filtered_includes_parents(self):
 
100
        repo = self.make_repo_with_history()
 
101
        revisions = [repo.get_revision(r) for r in
 
102
                     ['rev1', 'rev2', 'rev3', 'rev4', 'rev5', 'rev6']]
 
103
        deltas = list(repo.get_deltas_for_revisions(revisions,
 
104
                      specific_fileids=['subsubfile-id']))
 
105
        self.assertEqual([True, False, True, True, False, True],
 
106
                         [d.has_changed() for d in deltas])