# qiBuild documentation

# qisrc.sync – Synchronize a worktree with a manifest

Handling synchronization of a worktree with some manifests

## qisrc.sync.WorkTreeSyncer

class `qisrc.sync.``WorkTreeSyncer`(git_worktree)

  Handle the manifests of a worktree Stores the git url of the manifests and the groups that should be used, synchronizes the local manifests with the git worktree

  `sync`()

    Synchronize with a remote manifest: * clone missing repos * move repos that needs to be moved * reconfigure remotes and default branches * synchronizes build profiles :returns: True in case of success, False otherwise

  `manifest_xml`

    Manifest Xml

  `manifest_repo`

    Manifest Repo

  `sync_repos`(force=False)

    Update the manifest, inspect changes, and updates the git worktree accordingly.

  `configure_projects`(projects=None)

    Configure the given projects so that the actual git config matches the one coming from the manifest : Configure default remotes, default branches and code review, then save config To be called _after_ sync()

  `read_manifest_config`()

    Read Manifest Config

  `dump_manifest_config`()

    Save the manifest config in .qi/manifest.xml

  `configure_manifest`(url, branch=u'master', groups=None, all_repos=False, ref=None, review=None, force=False)

    Add a manifest to the list. Will be stored in .qi/manifests/<name>

  `read_remote_manifest`(manifest_xml=None, warn_if_missing_group=True)

    Read the manifest file in .qi/manifests/<name>/manifest.xml using the settings in .qi/manifest.xml (to know the name and the groups to use).

  `get_old_repos`(warn_if_missing_group=True)

    Backup all repos configuration before any synchronisation for compute_repo_diff to have the correct value.

  `sync_from_manifest_file`(xml_path)

    Just synchronize the manifest coming from one xml file. Used by `qisrc check-manifest`.

## qisrc.sync.LocalManifest

class `qisrc.sync.``LocalManifest`
  `name`

    name of the manifest

  `url`

    url of the manifest

  `branch`

    branch of the manifest

  `groups`

    a list of group names to use by default (default is: all projects)

Changelog CMake index Python index Index