Part of bzrlib.workingtree_4 View In Hierarchy
Known subclasses: bzrlib.workingtree_4.ContentFilteringDirStateWorkingTree, bzrlib.workingtree_4.WorkingTree4
Method | __init__ | Construct a WorkingTree for basedir. |
Method | add_reference | Add a TreeReference to the tree, pointing at sub_tree |
Method | break_lock | Break a lock if one is present from another instance. |
Method | commit | Undocumented |
Method | current_dirstate | Return the current dirstate object. |
Method | filter_unversioned_files | Filter out paths that are versioned. |
Method | flush | Write all cached data to disk. |
Method | get_file_sha1 | Undocumented |
Method | get_parent_ids | See Tree.get_parent_ids. |
Method | get_reference_revision | Undocumented |
Method | get_nested_tree | Undocumented |
Method | get_root_id | Return the id of this trees root |
Method | has_id | Undocumented |
Method | has_or_had_id | Undocumented |
Method | id2path | Convert a file-id to a path. |
Method | is_executable 0 | Test if a file is executable or not. |
Method | is_executable | Test if a file is executable or not. |
Method | all_file_ids | See Tree.iter_all_file_ids |
Method | __iter__ | Iterate through file_ids for this tree. |
Method | iter_references | Undocumented |
Method | kind | Return the kind of a file. |
Method | lock_read | See Branch.lock_read, and WorkingTree.unlock. |
Method | lock_tree_write | See MutableTree.lock_tree_write, and WorkingTree.unlock. |
Method | lock_write | See MutableTree.lock_write, and WorkingTree.unlock. |
Method | move | See WorkingTree.move(). |
Method | path2id | Return the id for path in this tree. |
Method | paths2ids | See Tree.paths2ids(). |
Method | read_working_inventory | Read the working inventory. |
Method | revision_tree | See Tree.revision_tree. |
Method | set_last_revision | Change the last revision in the working tree. |
Method | set_parent_ids | Set the parent ids to revision_ids. |
Method | set_parent_trees | Set the parents of the working tree. |
Method | supports_tree_reference | Undocumented |
Method | unlock | Unlock in format 4 trees needs to write the entire dirstate. |
Method | unversion | Remove the file ids in file_ids from the current versioned set. |
Method | rename_one | See WorkingTree.rename_one |
Method | apply_inventory_delta | See MutableTree.apply_inventory_delta |
Method | update_basis_by_delta | See MutableTree.update_basis_by_delta. |
Method | reset_state | Reset the state of the working tree. |
Method | _add | See MutableTree._add. |
Method | _get_check_refs | Return the references needed to perform a check of this tree. |
Method | _make_dirty | Make the tree state dirty. |
Method | _comparison_data | Undocumented |
Method | _current_dirstate | Internal function that does not check lock status. |
Method | _sha1_provider | A function that returns a SHA1Provider suitable for this tree. |
Method | _worth_saving_limit | How many hash changes are ok before we must save the dirstate. |
Method | _gather_kinds | See MutableTree._gather_kinds. |
Method | _generate_inventory | Create and set self.inventory from the dirstate object. |
Method | _get_entry | Get the dirstate row for file_id or path. |
Method | _get_inventory | Get the inventory for the tree. This is only valid within a lock. |
Method | _is_executable_from_path_and_stat_from_basis | Undocumented |
Method | _observed_sha1 | See MutableTree._observed_sha1. |
Method | _kind | Undocumented |
Method | _last_revision | See Mutable.last_revision. |
Method | _lock_self_write | This should be called after the branch is locked. |
Method | _must_be_locked | Undocumented |
Method | _new_tree | Initialize the state in this tree to be a new tree. |
Method | _paths2ids_in_memory | Undocumented |
Method | _paths2ids_using_bisect | Undocumented |
Method | _set_root_id | See WorkingTree.set_root_id. |
Method | _sha_from_stat | Get a sha digest from the tree's stat cache. |
Method | _validate | Validate internal structures. |
Method | _write_inventory | Write inventory as the current inventory. |
Inherited from InventoryWorkingTree:
Method | set_inventory | Undocumented |
Method | set_conflicts | Undocumented |
Method | add_conflicts | Undocumented |
Method | conflicts | Undocumented |
Method | read_basis_inventory | Read the cached basis inventory. |
Method | check_state | Check that the working state is/isn't valid. |
Method | get_file_mtime | See Tree.get_file_mtime. |
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 | 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_basis_inventory | Write the basis inventory XML to the basis-inventory file |
Method | _reset_data | Reset transient data that cannot be revalidated. |
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_stat | Undocumented |
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 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 | requires_rich_root | 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 | 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_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 | last_revision | Return the last revision of the branch for this tree. |
Method | is_locked | Undocumented |
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 | _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 | _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 | _flush_ignore_list_cache | Resets the cached ignore list to force a cache rebuild. |
Method | _file_size | 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 | _get_rules_searcher | See Tree._get_rules_searcher. |
Inherited from MutableTree (via InventoryWorkingTree, WorkingTree):
Method | add | Add paths to the set of versioned paths. |
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 |
Inherited from MutableInventoryTree (via InventoryWorkingTree):
Method | smart_add | Version file_list, optionally recursing into directories. |
Method | _fix_case_of_inventory_path | If our tree isn't case sensitive, return the canonical path |
Inherited from MutableTree (via 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 | 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 | 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 | _add_reference | Standard add_reference implementation, for use by subclasses |
If the branch is not supplied, it is opened automatically. If the branch is supplied, it must be the branch for this basedir. (branch.base is not cross checked, because for remote branches that would be meaningless).
Parameters | reset_inventory | True if the cached inventory should be removed (presuming there is one). |
Uses the ui factory to ask for confirmation if the lock may be from an active process.
This will probe the repository for its lock as well.
This is not part of the tree interface and only exposed for ease of testing.
Raises | errors.NotWriteLocked | when not in a lock. |
This is needed for break_lock which also needs the dirstate.
Returns | None if content filtering is not supported by this tree. Otherwise, a SHA1Provider is returned that sha's the canonical form of files, i.e. after read filters are applied. |
Returns | an integer. -1 means never save. |
This is relatively expensive: we have to walk the entire dirstate. Ideally we would not, and can deprecate this function.
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) |
This implementation requests the ids list from the dirstate file.
Note: The caller is expected to take a read-lock before calling this.
Note: The caller is expected to take a read-lock before calling this.
file_ids are in a WorkingTree if they are in the working inventory and the working file exists.
This is always the actual kind that's on disk, regardless of what it was added as.
Note: The caller is expected to take a read-lock before calling this.
Returns | A bzrlib.lock.LogicalLockResult. |
Returns | A bzrlib.lock.LogicalLockResult. |
Returns | A bzrlib.lock.LogicalLockResult. |
This specialisation fast-paths the case where all the trees are in the dirstate.
This is a meaningless operation for dirstate, but we obey it anyhow.
WorkingTree4 supplies revision_trees for any basis tree.
See also set_parent_trees. This api will try to retrieve the tree data for each element of revision_ids from the trees repository. If you have tree data already available, it is more efficient to use set_parent_trees rather than set_parent_ids. set_parent_ids is however an easier API to use.
Parameters | revision_ids | The revision_ids to set as the parent ids of this working tree. Any of these may be ghosts. |
Parameters | parents_list | A list of (revision_id, tree) tuples. If tree is None, then that element is treated as an unreachable parent tree - i.e. a ghost. |
The default implementation assumes no stat cache is present.
Parameters | path | The path. |
stat_result | The stat result being looked up. |
When a file_id is unversioned, all of its children are automatically unversioned.
Parameters | file_ids | The file ids to stop versioning. |
Raises | NoSuchId if any fileid is not currently versioned. |
This is meant mostly for the test suite. To give it a chance to detect corruption after actions have occurred. The default implementation is a just a no-op.
Returns | None. An exception should be raised if there is an error. |