qisys.worktree - Registering project paths¶
qisys.worktree.WorkTree¶
-
class
qisys.worktree.
WorkTree
(root, sanity_check=True)¶ This class represent a worktree.
-
register_self
()¶ Register to the global list of all worktrees in ~/.config/qi/qibuild.xml
-
register
(observer)¶ Called when an observer wants to be notified about project changes
-
load_cache
()¶ Load the worktree.xml file.
-
reload
()¶ Re-read every qiproject.xml. Useful when projects are added or removed, or when qiproject.xml change
-
check
()¶ Perform a few sanity checks
-
dot_qi
¶ Get the dot_qi directory.
-
worktree_xml
¶ Get the path to .qi/worktree.xml
-
has_project
(path)¶ Return True if the Path is a Projet
-
load_projects
()¶ For every project in cache, re-read the subprojects and and them to the list
-
get_project
(src, raises=False)¶ Get a project :param src: a absolute path, or a path relative to the worktree :param raises: Raises if project is not found :returns: a
WorkTreeProject
instance or None if raises isFalse and project is not found
-
add_project
(path)¶ Add a project to a worktree :param path: path to the project, can be absolute,
or relative to the worktree root
-
remove_project
(path, from_disk=False)¶ Remove a project from a worktree :param path: path to the project, can be absolute,
or relative to the worktree rootParameters: from_disk – also erase project files from disk
-
move_project
(path, new_path)¶ Move a project from a worktree
-
normalize_path
(path)¶ Make sure the path is a POSIX path, relative to the worktree root
-