b.p.w.w.WorkingTree2(PreDirStateWorkingTree) : class documentation

Part of bzrlib.plugins.weave_fmt.workingtree View In Hierarchy

This is the Format 2 working tree.

This was the first weave based working tree.
  • uses os locks for locking.
  • uses the branch last-revision.
Method __init__ Construct a InventoryWorkingTree instance. This is not a public API.
Method lock_tree_write See WorkingTree.lock_tree_write().
Method unlock See Branch.unlock.
Method conflicts Undocumented
Method set_conflicts Undocumented
Method add_conflicts Undocumented
Method _get_check_refs Return the references needed to perform a check of this tree.
Method _iter_conflicts Undocumented

Inherited from PreDirStateWorkingTree:

Method get_file_sha1 Undocumented
Method _write_hashcache_if_dirty Write out the hashcache if it is dirty.

Inherited from InventoryWorkingTree (via PreDirStateWorkingTree):

Method set_inventory Undocumented
Method all_file_ids See Tree.iter_all_file_ids
Method set_parent_trees See MutableTree.set_parent_trees.
Method read_basis_inventory Read the cached basis inventory.
Method read_working_inventory Read the working inventory.
Method get_root_id Return the id of this trees root
Method has_id Undocumented
Method has_or_had_id Undocumented
Method __iter__ Iterate through file_ids for this tree.
Method set_last_revision Change the last revision in the working tree.
Method check_state Check that the working state is/isn't valid.
Method reset_state Reset the state of the working tree.
Method flush Write the in memory inventory to disk.
Method get_file_mtime See Tree.get_file_mtime.
Method is_executable 0 Undocumented
Method is_executable Undocumented
Method revision_tree See WorkingTree.revision_id.
Method annotate_iter See Tree.annotate_iter
Method merge_modified Return a dictionary of files modified by a merge.
Method subsume Undocumented
Method extract Extract a subtree from this tree.
Method list_files List all files as (path, class, kind, id, entry).
Method move Rename files.
Method rename_one Rename one file.
Method unversion Remove the file ids in file_ids from the current versioned set.
Method stored_kind See Tree.stored_kind
Method extras Yield all unversioned files in this WorkingTree.
Method _set_inventory Set the internal cached inventory.
Method _detect_case_handling Undocumented
Method _serialize Undocumented
Method _deserialize Undocumented
Method _write_inventory Write inventory as the current inventory.
Method _write_basis_inventory Write the basis inventory XML to the basis-inventory file
Method _reset_data Reset transient data that cannot be revalidated.
Method _set_root_id Set the root id for this tree, in a format specific manner.
Method _cache_basis_inventory Cache new_revision as the basis inventory.
Method _basis_inventory_name Undocumented
Method _create_basis_xml_from_inventory Create the text that will be saved in basis-inventory
Method _check Check the tree for consistency.
Method _is_executable_from_path_and_stat_from_basis Undocumented
Method _is_executable_from_path_and_stat_from_stat Undocumented
Method _add See MutableTree._add.
Class _RenameEntry Undocumented
Method _determine_mv_mode Determines for each from-to pair if both inventory and working tree
Method _move Moves a list of files.
Method _rollback_move Try to rollback a previous move in case of an filesystem error.
Method _move_entry Undocumented
Method _walkdirs Walk the directories of this tree.

Inherited from WorkingTree (via PreDirStateWorkingTree, InventoryWorkingTree):

Method user_transport Undocumented
Method control_transport Undocumented
Method is_control_filename True if filename is the name of a control file in this tree.
Method has_versioned_directories See Tree.has_versioned_directories.
Method break_lock Break a lock if one is present from another instance.
Method requires_rich_root Undocumented
Method supports_tree_reference Undocumented
Method supports_content_filtering Undocumented
Method supports_views Undocumented
Static Method open Open an existing working tree at path.
Static Method open_containing Open an existing working tree which has its root about path.
Static Method open_containing_paths Open the WorkingTree that contains a set of paths.
Method safe_relpath_files Convert file_list into a list of relpaths in tree.
Static Method open_downlevel Open an unsupported working tree.
Static Method find_trees Undocumented
Method __repr__ Undocumented
Method abspath Undocumented
Method basis_tree Return RevisionTree for the current last revision.
Method relpath Return the local path portion from a given path.
Method has_filename Undocumented
Method get_file Undocumented
Method get_file_with_stat See Tree.get_file_with_stat.
Method get_file_text Undocumented
Method get_file_byname Undocumented
Method get_file_lines See Tree.get_file_lines()
Method get_parent_ids See Tree.get_parent_ids.
Method clone Duplicate this working tree into to_bzr, including all state.
Method copy_content_into Copy the current content and user files of this tree into tree.
Method id2abspath Undocumented
Method iter_entries_by_dir See Tree.iter_entries_by_dir()
Method get_file_size See Tree.get_file_size
Method add_parent_tree_id Add revision_id as a parent.
Method add_parent_tree Add revision_id, tree tuple as a parent.
Method add_pending_merge Undocumented
Method path_content_summary See Tree.path_content_summary.
Method set_parent_ids Set the parent ids to revision_ids.
Method set_pending_merges Undocumented
Method set_merge_modified Undocumented
Method merge_from_branch Merge from a branch into this working tree.
Method mkdir See MutableTree.mkdir().
Method get_symlink_target Undocumented
Method unknowns Return all unknown files.
Method pull Undocumented
Method put_file_bytes_non_atomic See MutableTree.put_file_bytes_non_atomic.
Method ignored_files Yield list of PATH, IGNORE_PATTERN
Method get_ignore_list Return list of ignore patterns.
Method is_ignored Check whether the filename matches an ignore pattern.
Method kind Undocumented
Method last_revision Return the last revision of the branch for this tree.
Method is_locked Undocumented
Method lock_read Lock the tree for reading.
Method lock_write See MutableTree.lock_write, and WorkingTree.unlock.
Method get_physical_lock_status Undocumented
Method remove Remove nominated files from the working tree metadata.
Method revert Undocumented
Method set_root_id Set the root id for this tree.
Method update Update a working tree along its branch.
Method walkdirs Walk the directories of this tree.
Method auto_resolve Automatically resolve text conflicts according to contents.
Method get_shelf_manager Return the ShelfManager for this WorkingTree.
Method _make_views Undocumented
Method _cleanup Undocumented
Method _check_for_tree_references See if directories have become tree-references.
Method _gather_kinds See MutableTree._gather_kinds.
Method _file_content_summary Undocumented
Method _check_parents_for_ghosts Common ghost checking functionality from set_parent_*.
Method _set_merges_from_parent_ids Undocumented
Method _filter_parent_ids_by_ancestry Check that all merged revisions are proper 'heads'.
Method _sha_from_stat Get a sha digest from the tree's stat cache.
Method _put_rio Undocumented
Method _setup_directory_is_tree_reference Undocumented
Method _directory_is_never_tree_reference Undocumented
Method _directory_may_be_tree_reference Undocumented
Method _kind Undocumented
Method _flush_ignore_list_cache Resets the cached ignore list to force a cache rebuild.
Method _comparison_data Undocumented
Method _file_size Undocumented
Method _last_revision helper for get_parent_ids.
Method _must_be_locked Undocumented
Method _change_last_revision Template method part of set_last_revision to perform the change.
Method _update_tree Update a tree to the master branch.
Method _validate Validate internal structures.
Method _get_rules_searcher See Tree._get_rules_searcher.

Inherited from MutableTree (via PreDirStateWorkingTree, InventoryWorkingTree, WorkingTree):

Method add Add paths to the set of versioned paths.
Method add_reference Add a TreeReference to the tree, pointing at sub_tree
Method apply_inventory_delta Apply changes to the inventory as an atomic operation.
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 smart_add Version file_list, optionally recursing into directories.
Method _add_reference Standard add_reference implementation, for use by subclasses
Method _observed_sha1 Tell the tree we have observed a paths sha1.

Inherited from MutableInventoryTree (via PreDirStateWorkingTree, 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 (via PreDirStateWorkingTree, InventoryWorkingTree, MutableInventoryTree):

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_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 _add_reference Standard add_reference implementation, for use by subclasses
Method _gather_kinds Helper function for add - sets the entries of kinds.
Method _observed_sha1 Tell the tree we have observed a paths sha1.
def __init__(self, basedir, *args, **kwargs):
Construct a InventoryWorkingTree instance. This is not a public API.
ParametersbranchA branch to override probing for the branch.
def _get_check_refs(self):
Return the references needed to perform a check of this tree.
def lock_tree_write(self):
See WorkingTree.lock_tree_write().

In Format2 WorkingTrees we have a single lock for the branch and tree so lock_tree_write() degrades to lock_write().

ReturnsAn object with an unlock method which will release the lock obtained.
def unlock(self):
See Branch.unlock.

WorkingTree locking just uses the Branch locking facilities. This is current because all working trees have an embedded branch within them. IF in the future, we were to make branch data shareable between multiple working trees, i.e. via shared storage, then we would probably want to lock both the local tree, and the branch.

def _iter_conflicts(self):
Undocumented
@needs_read_lock
def conflicts(self):
Undocumented
def set_conflicts(self, arg):
Undocumented
def add_conflicts(self, arg):
Undocumented
API Documentation for Bazaar, generated by pydoctor at 2022-06-16 00:25:16.