qiBuild documentation

qisrc.project - git projects in a GitWorkTree

qisrc.worktree.GitProject

class qisrc.project.GitProject

This class represent a git configuration.

Every git configuration is stored in the worktree, in a .qi/git.xml file.

qisrc then make sure the actual git repository matches the configuration stored in the file. (That the branches and remotes exist, and the tracking branches are correctly set)

qisrc sync also reads the configuration from the remote manifest, and makes sure everything matches

class qisrc.project.GitProject(git_worktree, worktree_project)
default_branch

The default branch for this repository

review_remote

The remote to use when doing code review

default_remote

The remote to use by default

clone_url

The url to use when cloning this repository for the first time

path

The full, native path to the underlying git repository

configure_remote(remote)

Configure a remote. If a remote with the same name exists, its url will be overwritten

update_remote(remote, new)

Helper for configure_remote

configure_branch(name, tracks='origin', remote_branch=None, default=True, quiet=False)

Configure a branch. If a branch with the same name already exists, update its tracking remote.

read_remote_config(repo, quiet=False)

Apply the configuration read from the “repo” setting of a remote manifest. Called by WorkTreeSyncer

sync(rebase_devel=False, **kwargs)

Synchronize remote changes with the underlying git repository Calls qisrc.git.Git.sync_branch()

Warning

this method is called in parallel when calling qisrc sync, therefore it must not cause any side-effect on the global state outside of this repo.

reset()

Same as sync, but discard any local changes

Warning

this method is called in parallel when calling qisrc sync, therefore it must not cause any side-effect on the global state outside of this repo.

apply_config()

Apply configuration to the underlying git repository