Part of bzrlib.workingtree_4 View In Hierarchy
Note that this is one of the historical (ie revision) trees cached in the dirstate for easy access, not the workingtree.
Method | __init__ | Undocumented |
Method | __repr__ | Undocumented |
Method | annotate_iter | See Tree.annotate_iter |
Method | filter_unversioned_files | Filter out paths that are not versioned. |
Method | get_root_id | Return the file_id for the root of this tree. |
Method | id2path | Convert a file-id to a path. |
Method | iter_references | Undocumented |
Method | get_file_mtime | Return the modification time for this record. |
Method | get_file_sha1 | Return the SHA1 file for a file. |
Method | get_file_revision | Undocumented |
Method | get_file | Return a file object for the file file_id in the tree. |
Method | get_file_size | See Tree.get_file_size |
Method | get_file_text | Return the byte content of a file. |
Method | get_reference_revision | Undocumented |
Method | iter_files_bytes | See Tree.iter_files_bytes. |
Method | get_symlink_target | Get the target for a given file_id. |
Method | get_revision_id | Return the revision id for this tree. |
Method | get_parent_ids | The parents of a tree in the dirstate are not cached. |
Method | has_filename | True if the tree has given filename. |
Method | kind | Undocumented |
Method | stored_kind | See Tree.stored_kind |
Method | path_content_summary | See Tree.path_content_summary. |
Method | is_executable | Check if a file is executable. |
Method | is_locked | Undocumented |
Method | list_files | List all files in this tree. |
Method | lock_read | Lock the tree for a set of operations. |
Method | path2id | Return the id for path in this tree. |
Method | unlock | Unlock, freeing any cache memory used during the lock. |
Method | supports_tree_reference | Undocumented |
Method | walkdirs | Walk the contents of this tree from path down. |
Method | _comparison_data | See Tree._comparison_data. |
Method | _file_size | Undocumented |
Method | _get_parent_index | Return the index in the dirstate referenced by this tree. |
Method | _get_entry | Get the dirstate row for file_id or path. |
Method | _generate_inventory | Create and set self.inventory from the dirstate object. |
Method | _get_inventory | Undocumented |
Method | _must_be_locked | Undocumented |
Inherited from InventoryTree:
Method | get_canonical_inventory_paths | Like get_canonical_inventory_path() but works on multiple items. |
Method | get_canonical_inventory_path | Returns the first inventory item that case-insensitively matches path. |
Method | has_id | Undocumented |
Method | has_or_had_id | Undocumented |
Method | all_file_ids | Iterate through all file ids, including ids for missing files. |
Method | __iter__ | Undocumented |
Method | iter_entries_by_dir | Walk the tree in 'by_dir' order. |
Method | get_file_by_path | Undocumented |
Method | _yield_canonical_inventory_paths | Undocumented |
Inherited from Tree (via InventoryTree):
Method | has_versioned_directories | Whether this tree can contain explicitly versioned directories. |
Method | changes_from | Return a TreeDelta of the changes from other to this tree. |
Method | iter_changes | See InterTree.iter_changes |
Method | conflicts | Get a list of the conflicts in the tree. |
Method | extras | For trees that can have unversioned files, return all such paths. |
Method | __contains__ | Undocumented |
Method | is_ignored | Check whether the filename is ignored by this tree. |
Method | get_file_with_stat | Get a file handle and stat object for file_id. |
Method | get_file_lines | Return the content of a file, as lines. |
Method | get_file_verifier | Return a verifier for a file. |
Method | plan_file_merge | Generate a merge plan based on annotations. |
Method | plan_file_lca_merge | Generate a merge plan based lca-newness. |
Method | paths2ids | Return all the ids that can be reached by walking from paths. |
Method | iter_children | Undocumented |
Method | revision_tree | Obtain a revision tree for the revision revision_id. |
Method | unknowns | What files are present in this tree and unknown. |
Method | supports_content_filtering | Undocumented |
Method | iter_search_rules | Find the preferences for filenames in a tree. |
Method | _get_plan_merge_data | Undocumented |
Method | _iter_parent_trees | Iterate through parent trees, defaulting to Tree.revision_tree. |
Method | _get_file_revision | Ensure that file_id, tree_revision is in vf to plan the merge. |
Method | _check_retrieved | Undocumented |
Method | _content_filter_stack | The stack of content filters for a path if filtering is supported. |
Method | _content_filter_stack_provider | A function that returns a stack of ContentFilters. |
Method | _get_rules_searcher | Get the RulesSearcher for this tree given the default one. |
Returns | set of paths. |
If either file_id or path is supplied, it is used as the key to lookup. If both are supplied, the fastest lookup is used, and an error is raised if they do not both point at the same row.
Parameters | file_id | An optional unicode file_id to be looked up. |
path | An optional unicode path to be looked up. | |
Returns | The dirstate row tuple for path/file_id, or (None, None) |
(So this is only called the first time the inventory is requested for this tree; it then remains in memory until it's out of date.)
This is relatively expensive: we have to walk the entire dirstate.
We return the timestamp of the last-changed revision.
Parameters | file_id | The handle for this file. |
path | The path that this file can be found at. These must point to the same object. | |
stat_value | Optional stat value for the object | |
Note | callers should use get_file_verifier instead where possible, as the underlying repository implementation may have quicker access to a non-sha1 verifier. |
If both file_id and path are defined, it is implementation defined as to which one is used.
If both file_id and path are supplied, an implementation may use either one.
Parameters | file_id | The file_id of the file. |
path | The path of the file. | |
Returns | A single byte string for the whole file. |
This version is implemented on top of Repository.iter_files_bytes
It is assumed that the caller already knows that file_id is referencing a symlink. :param file_id: Handle for the symlink entry. :param path: The path of the file. If both file_id and path are supplied, an implementation may use either one. :return: The path the symlink points to.
Parameters | file_id | The handle for this file. |
path | The path that this file can be found at. These must point to the same object. |
Parameters | include_root | Whether to include the entry for the tree root |
from_dir | Directory under which to list files | |
recursive | Whether to list files recursively | |
Returns | iterator over tuples of (path, versioned, kind, file_id, inventory entry) |
Returns | A bzrlib.lock.LogicalLockResult. |
Walk the contents of this tree from path down. This yields all the data about the contents of a directory at a time. After each directory has been yielded, if the caller has mutated the list to exclude some directories, they are then not descended into. The data yielded is of the form: ((directory-relpath, directory-path-from-root, directory-fileid), [(relpath, basename, kind, lstat, path_from_tree_root, file_id, versioned_kind), ...]), - directory-relpath is the containing dirs relpath from prefix - directory-path-from-root is the containing dirs path from / - directory-fileid is the id of the directory if it is versioned. - relpath is the relative path within the subtree being walked. - basename is the basename - kind is the kind of the file now. If unknonwn then the file is not present within the tree - but it may be recorded as versioned. See versioned_kind. - lstat is the stat data *if* the file was statted. - path_from_tree_root is the path from the root of the tree. - file_id is the file_id if the entry is versioned. - versioned_kind is the kind of the file as last recorded in the versioning system. If 'unknown' the file is not versioned. One of 'kind' and 'versioned_kind' must not be 'unknown'. :param prefix: Start walking from prefix within the tree rather than at the root. This allows one to walk a subtree but get paths that are relative to a tree rooted higher up. :return: an iterator over the directory data.