Part of bzrlib.transform View In Hierarchy
Method | __init__ | Undocumented |
Method | is_locked | Undocumented |
Method | lock_read | Lock this tree for multiple read only operations. |
Method | unlock | Undocumented |
Method | inventory | This Tree does not use inventory as its backing data. |
Method | get_root_id | Return the file_id for the root of this tree. |
Method | all_file_ids | Iterate through all file ids, including ids for missing files. |
Method | __iter__ | Undocumented |
Method | has_id | Undocumented |
Method | has_or_had_id | Undocumented |
Method | path2id | Return the id for path in this tree. |
Method | id2path | Return the path for a file id. |
Method | iter_children | Undocumented |
Method | extras | For trees that can have unversioned files, return all such paths. |
Method | iter_entries_by_dir | Walk the tree in 'by_dir' order. |
Method | list_files | See WorkingTree.list_files. |
Method | kind | Undocumented |
Method | stored_kind | File kind stored for this file_id. |
Method | get_file_mtime | See Tree.get_file_mtime |
Method | get_file_size | See Tree.get_file_size |
Method | get_file_verifier | Return a verifier for a file. |
Method | get_file_sha1 | Return the SHA1 file for a file. |
Method | is_executable | Check if a file is executable. |
Method | has_filename | True if the tree has given filename. |
Method | path_content_summary | Get a summary of the information about path. |
Method | iter_changes | See InterTree.iter_changes. |
Method | get_file | See Tree.get_file |
Method | get_file_with_stat | Get a file handle and stat object for file_id. |
Method | annotate_iter | Return an iterator of revision_id, line tuples. |
Method | get_symlink_target | See Tree.get_symlink_target |
Method | walkdirs | Walk the contents of this tree from path down. |
Method | get_parent_ids | Get the parent ids for this tree. |
Method | set_parent_ids | Undocumented |
Method | get_revision_tree | Undocumented |
Method | _content_change | Return True if the content of this file changed |
Method | _get_repository | 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 | _stat_limbo_file | Undocumented |
Method | _by_parent | Undocumented |
Method | _comparison_data | Return a tuple of kind, executable, stat_value for a file. |
Method | _has_id | Undocumented |
Method | _path2trans_id | Undocumented |
Method | _all_children | Undocumented |
Method | _make_inv_entries | Undocumented |
Method | _list_files_by_dir | Undocumented |
Method | _iter_entries_for_dir | Return path, entry for items in a directory without recursing down. |
Method | _file_size | 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 | filter_unversioned_files | Filter out paths that are versioned. |
Method | get_file_by_path | Undocumented |
Method | _yield_canonical_inventory_paths | Undocumented |
Method | _get_inventory | 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 | conflicts | Get a list of the conflicts in the tree. |
Method | __contains__ | Undocumented |
Method | is_ignored | Check whether the filename is ignored by this tree. |
Method | iter_references | Undocumented |
Method | get_reference_revision | Undocumented |
Method | get_file_text | Return the byte content of a file. |
Method | get_file_lines | Return the content of a file, as lines. |
Method | iter_files_bytes | Iterate through file contents. |
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 | 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 | _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. |
entry may be None if there is no inventory entry for the file, but path must always be supplied.
kind is None if there is no file present (even if an inventory id is present). executable is False for non-file entries.
Returns | A bzrlib.lock.LogicalLockResult. |
Raises | NoSuchId |
This will yield each entry in the tree as a (path, entry) tuple. The order that they are yielded is:
See Tree.iter_entries_by_dir for details.
Parameters | yield_parents | If True, yield the parents from the root leading down to specific_file_ids that have been requested. This has no impact if specific_file_ids is None. |
May not match kind on disk for working trees. Always available for versioned files, even when the file itself is missing.
The default implementation returns a sha1.
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 | |
Returns | Tuple with verifier name and verifier data |
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. |
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. |
Get a summary of the information about path. All the attributes returned are for the canonical form, not the convenient form (if content filters are in use.) :param path: A relative path within the tree. :return: A tuple containing kind, size, exec, sha1-or-link. Kind is always present (see tree.kind()). size is present if kind is file and the size of the canonical form can be cheaply determined, None otherwise. exec is None unless kind is file and the platform supports the 'x' bit. sha1-or-link is the link target if kind is symlink, or the sha1 if it can be obtained without reading the file.
This has a fast path that is only used when the from_tree matches the transform tree, and no fancy options are supplied.
The default implementation returns (self.get_file, None) for backwards compatibility.
Parameters | file_id | The file id to read. |
path | The path of the file, if it is known. | |
Returns | A tuple (file_handle, stat_value_or_None). If the tree has no stat facility, or need for a stat cache feedback during commit, it may return None for the second element of the tuple. |
Return an iterator of revision_id, line tuples. For working trees (and mutable trees in general), the special revision_id 'current:' will be used for lines that are new in this tree, e.g. uncommitted changes. :param file_id: The file to produce an annotated version from :param default_revision: For lines that don't match a basis, mark them with this revision id. Not all implementations will make use of this value.
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.
Get the parent ids for this tree. :return: a list of parent ids. [] is returned to indicate a tree with no parents. :raises: BzrError if the parents are not known.