WT.iter_changes(arbitrary_tree) should use chaining

Bug #761442 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned

Bug Description

Right now, bzr has 2 fast iter_changes paths. RevTree.iter_changes(RevTree) can use the CHK logic to avoid walking the whole tree to compute the difference. And WT.iter_changes(tree-in-dirstate) can walk line-by-line in the dirstate to be very fast as well. (And in general, we have to walk the real-working-tree to see if there are any recent changes anyway.)
The dirstate layout is not similar to how the data is stored in the repository (dirstate is ordered by path, repo is ordered ~by file-id.).
However, we should be able to composite 2 iter_changes output together. So doing "WT.iter_changes(arbitrary_tree)" can do:
 WT.iter_changes(WT.basis_tree()) + WT.basis_tree().iter_changes(arbitrary_tree)

Revision history for this message
John A Meinel (jameinel) wrote :

This would be relevant for "bzr revert/status/diff -r -10". I'm not sure if that is common enough that we should focus on it, though. Implementing chained iter_changes() is a fair amount of logic, and needs very careful edge-case handling.

Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.