Part of bzrlib.mutabletree View In Hierarchy
Known subclasses: bzrlib.memorytree.MemoryTree, bzrlib.workingtree.InventoryWorkingTree
Method | apply_inventory_delta | Apply changes to the inventory as an atomic operation. |
Method | smart_add | Version file_list, optionally recursing into directories. |
Method | update_basis_by_delta | Update the parents of this tree after a commit. |
Method | _fix_case_of_inventory_path | If our tree isn't case sensitive, return the canonical path |
Inherited from MutableTree:
Method | __init__ | Undocumented |
Method | is_control_filename | True if filename is the name of a control file in this tree. |
Method | add | Add paths to the set of versioned paths. |
Method | add_reference | Add a TreeReference to the tree, pointing at sub_tree |
Method | commit | Undocumented |
Method | has_changes | Quickly check that the tree contains at least one commitable change. |
Method | check_changed_or_out_of_date | Check the tree for uncommitted changes and branch synchronization. |
Method | last_revision | Return the revision id of the last commit performed in this tree. |
Method | lock_tree_write | Lock the working tree for write, and the branch for read. |
Method | lock_write | Lock the tree and its branch. This allows mutating calls to be made. |
Method | mkdir | Create a directory in the tree. if file_id is None, one is assigned. |
Method | put_file_bytes_non_atomic | Update the content of a file in the tree. |
Method | set_parent_ids | Set the parents ids of the working tree. |
Method | set_parent_trees | Set the parents of the working tree. |
Method | _add_reference | Standard add_reference implementation, for use by subclasses |
Method | _add | Helper function for add - updates the inventory. |
Method | _gather_kinds | Helper function for add - sets the entries of kinds. |
Method | _observed_sha1 | Tell the tree we have observed a paths sha1. |
Parameters | changes | An inventory delta to apply to the working tree's inventory. |
Returns | ||
See Also | For details on the changes parameter. |
This is designed more towards DWIM for humans than API clarity. For the specific behaviour see the help for cmd_add().
Parameters | file_list | List of zero or more paths. NB: these are interpreted relative to the process cwd, not relative to the tree. (Add and most other tree methods use tree-relative paths.) |
action | A reporter to be called with the inventory, parent_ie, path and kind of the path being added. It may return a file_id if a specific one should be used. | |
save | Save the inventory after completing the adds. If False this provides dry-run functionality by doing the add and not saving the inventory. | |
Returns | A tuple - files_added, ignored_files. files_added is the count of added files, and ignored_files is a dict mapping files that were ignored to the rule that caused them to be ignored. |
This gives the tree one parent, with revision id new_revid. The inventory delta is applied to the current basis tree to generate the inventory for the parent new_revid, and all other parent trees are discarded.
All the changes in the delta should be changes synchronising the basis tree with some or all of the working tree, with a change to a directory requiring that its contents have been recursively included. That is, this is not a general purpose tree modification routine, but a helper for commit which is not required to handle situations that do not arise outside of commit.
See the inventory developers documentation for the theory behind inventory deltas.
Parameters | new_revid | The new revision id for the trees parent. |
delta | An inventory delta (see apply_inventory_delta) describing the changes from the current left most parent revision to new_revid. |