b.r.InventoryRevisionTree(RevisionTree, tree.InventoryTree) : class documentation

Part of bzrlib.revisiontree View In Hierarchy

No class docstring
Method __init__ Undocumented
Method get_file_mtime Return the modification time for a file.
Method get_file_size Return the size of a file in bytes.
Method get_file_sha1 Return the SHA1 file for a file.
Method get_file_revision Return the revision id in which a file was last changed.
Method is_executable Check if a file is executable.
Method has_filename True if the tree has given filename.
Method list_files List all files in this tree.
Method get_symlink_target Get the target for a given file_id.
Method get_reference_revision Undocumented
Method get_root_id Return the file_id for the root of this tree.
Method kind Undocumented
Method path_content_summary See Tree.path_content_summary.
Method walkdirs Walk the contents of this tree from path down.
Method iter_files_bytes See Tree.iter_files_bytes.
Method annotate_iter See Tree.annotate_iter
Method _comparison_data Return a tuple of kind, executable, stat_value for a file.
Method _file_size Undocumented

Inherited from RevisionTree:

Method has_versioned_directories See Tree.has_versioned_directories.
Method supports_tree_reference Undocumented
Method get_parent_ids See Tree.get_parent_ids.
Method get_revision_id Return the revision id associated with this tree.
Method get_file_text Return the byte content of a file.
Method get_file Return a file object for the file file_id in the tree.
Method is_locked Undocumented
Method lock_read Lock this tree for multiple read only operations.
Method __repr__ Undocumented
Method unlock Undocumented
Method _get_rules_searcher See Tree._get_rules_searcher.

Inherited from Tree (via RevisionTree):

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 has_id Undocumented
Method __contains__ Undocumented
Method has_or_had_id Undocumented
Method is_ignored Check whether the filename is ignored by this tree.
Method all_file_ids Iterate through all file ids, including ids for missing files.
Method id2path Return the path for a file id.
Method iter_entries_by_dir Walk the tree in 'by_dir' order.
Method iter_references Undocumented
Method stored_kind File kind stored for this file_id.
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 get_file_by_path Undocumented
Method plan_file_merge Generate a merge plan based on annotations.
Method plan_file_lca_merge Generate a merge plan based lca-newness.
Method path2id Return the id for path in this tree.
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 filter_unversioned_files Filter out paths that are versioned.
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.

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 path2id Return the id for path in this tree.
Method id2path Return the path for a file id.
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 filter_unversioned_files Filter out paths that are versioned.
Method iter_entries_by_dir Walk the tree in 'by_dir' order.
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 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 get_parent_ids Get the parent ids for this tree.
Method __contains__ Undocumented
Method is_ignored Check whether the filename is ignored by this tree.
Method iter_references Undocumented
Method stored_kind File kind stored for this file_id.
Method get_file Return a file object for the file file_id in the tree.
Method get_file_with_stat Get a file handle and stat object for file_id.
Method get_file_text Return the byte content of a file.
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 lock_read Lock this tree for multiple read only operations.
Method revision_tree Obtain a revision tree for the revision revision_id.
Method unknowns What files are present in this tree and unknown.
Method unlock Undocumented
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.
def __init__(self, repository, inv, revision_id):
Undocumented
def get_file_mtime(self, file_id, path=None):
Return the modification time for a file.
Parametersfile_idThe handle for this file.
pathThe path that this file can be found at. These must point to the same object.
def get_file_size(self, file_id):
Return the size of a file in bytes.

This applies only to regular files. If invoked on directories or symlinks, it will return None. :param file_id: The file-id of the file

def get_file_sha1(self, file_id, path=None, stat_value=None):
Return the SHA1 file for a file.
Parametersfile_idThe handle for this file.
pathThe path that this file can be found at. These must point to the same object.
stat_valueOptional stat value for the object
Notecallers should use get_file_verifier instead where possible, as the underlying repository implementation may have quicker access to a non-sha1 verifier.
def get_file_revision(self, file_id, path=None):
Return the revision id in which a file was last changed.
def is_executable(self, file_id, path=None):
Check if a file is executable.
Parametersfile_idThe handle for this file.
pathThe path that this file can be found at. These must point to the same object.
def has_filename(self, filename):
True if the tree has given filename.
def list_files(self, include_root=False, from_dir=None, recursive=True):
List all files in this tree.
Parametersinclude_rootWhether to include the entry for the tree root
from_dirDirectory under which to list files
recursiveWhether to list files recursively
Returnsiterator over tuples of (path, versioned, kind, file_id, inventory entry)
def get_symlink_target(self, file_id, path=None):
Get the target for a given file_id.

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.

def get_reference_revision(self, file_id, path=None):
Undocumented
def get_root_id(self):
Return the file_id for the root of this tree.
def kind(self, file_id):
Undocumented
def path_content_summary(self, path):
See Tree.path_content_summary.
def _comparison_data(self, entry, path):
Return a tuple of kind, executable, stat_value for a file.

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.

def _file_size(self, entry, stat_value):
Undocumented
def walkdirs(self, prefix=''):
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.
def iter_files_bytes(self, desired_files):
See Tree.iter_files_bytes.

This version is implemented on top of Repository.extract_files_bytes

def annotate_iter(self, file_id, default_revision=revision.CURRENT_REVISION):
See Tree.annotate_iter
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.