Class Subrepos

multigit.subrepos.SUBREPOS_FILE = 'subrepos'

The “fixed” name of the YAML file with subrepo definitions.

This file will first be loaded from current dir.

Otherwise, if within a git sandbox, it will be looked for at the git sandbox’ root.

class multigit.Subrepos[source]

Recursively reads subrepos files and runs git commands as per its findings

process(base_path, report_only=True)[source]

Recursively finds and processes subrepos files.

If there’s a ‘subrepos’ file right a base_path, it will be processed.

If there is not a ‘subrepos’ file at base_path and base_path is within a git repo, it will try to find one at its root.

Parameters:
  • base_path (str) – the absolute path to the directory where subrepos file will be searched and processed.

  • report_only (bool) – True, just shows dirtree status; False, updates dirtree.

__print_subrepo_status(subrepo)

prints a report on the repo info provided as param.

Parameters:

subrepo (dict) – a dictionary in the enhanced form returned by __process_subrepo()