Part of bzrlib.tree View In Hierarchy
Method | __init__ | Create a new MultiWalker. |
Method | iter_all | Match up the values in the different trees. |
Static Method | _step_one | Step an iter_entries_by_dir iterator. |
Static Method | _cmp_path_by_dirblock | Compare two paths based on what directory they are in. |
Static Method | _path_to_key | Undocumented |
Method | _lookup_by_file_id | Lookup an inventory entry by file_id. |
Method | _walk_master_tree | First pass, walk all trees in lock-step. |
Method | _finish_others | Finish walking the other iterators, so we get all entries. |
Method | _walk_others | Finish up by walking all the 'deferred' nodes. |
All trees being walked must implement "iter_entries_by_dir()", such that they yield (path, object) tuples, where that object will have a '.file_id' member, that can be used to check equality.
Parameters | master_tree | All trees will be 'slaved' to the master_tree such that nodes in master_tree will be used as 'first-pass' sync points. Any nodes that aren't in master_tree will be merged in a second pass. |
other_trees | A list of other trees to walk simultaneously. |
Returns | (has_more, path, ie) If has_more is False, path and ie will be None. |
This generates a sort order, such that all children of a directory are sorted together, and grandchildren are in the same order as the children appear. But all grandchildren come after all children.
Parameters | path1 | first path |
path2 | the second path | |
Returns | negative number if path1 comes first, 0 if paths are equal and a positive number if path2 sorts first |
This is called when an entry is missing in the normal order. Generally this is because a file was either renamed, or it was deleted/added. If the entry was found in the inventory and not in extra_entries, it will be added to self._out_of_order_processed
Parameters | extra_entries | A dictionary of {file_id: (path, ie)}. This should be filled with entries that were found before they were used. If file_id is present, it will be removed from the dictionary. |
other_tree | The Tree to search, in case we didn't find the entry yet. | |
file_id | The file_id to look for | |
Returns | (path, ie) if found or (None, None) if not present. |