qisrc.worktree – Managing git projects¶
qisrc.worktree.GitWorkTree¶
-
class
qisrc.worktree.
GitWorkTree
(worktree)¶ Stores a list of git projects and a list of manifests
-
configure_manifest
(manifest_url, groups=None, all_repos=False, branch=u'master', ref=None, review=None, force=False)¶ Add a new manifest to this worktree
-
configure_projects
(projects)¶ Configure Projects
-
check_manifest
(xml_path)¶ Run a sync using just the xml file given as parameter
-
sync
()¶ Delegates to WorkTreeSyncer
-
load_git_projects
()¶ Build a list of git projects using the xml configuration
-
get_git_project
(path, raises=False, auto_add=False)¶ Get a git project by its sources
-
get_git_projects
(groups=None)¶ Get the git projects matching a given group
-
find_repo
(repo)¶ Look for a project configured with the given repo
-
git_xml
¶ Git Xml
-
manifest
¶ Manifest
-
manifest_branch
()¶ Current manifest branch
-
snapshot
()¶ Return a :py:class`.Snapshot` of the current worktree state
-
add_git_project
(src)¶ Add a new git project
-
reload
()¶ Reload
-
clone_missing
(repo)¶ Add a new project. :returns: a boolean telling if the clone succeeded
-
move_repo
(repo, new_src, force=False)¶ Move a project in the worktree (same remote url, different src)
-
checkout
(branch, force=False)¶ Called by
qisrc checkout
For each project, checkout the branch if it is different than the default branch of the manifest.
-
get_projects_on_branch
(branch)¶ Return a dict (src, project) for every project as configured on the given branch of the manifest.
-
remove_repo
(project)¶ Remove a project from the worktree
-
save_project_config
(project)¶ Save the project instance in .qi/git.xml
-
save_git_config
()¶ Save the worktree config in .qi/git.xml
-