How It Works#

Run Flow#

Each repo has repo.bat and repo.sh in the root. When user runs one of these (based on their platform), the following happens:

  1. repo.bat (Windows) or repo.sh (Linux) uses packman as bootstrapper to get python and download other tools. It invokes Python to run the bootstrap script. Typically from tools/repoman/repoman.py.

  2. The bootstrap script uses packman API to download project dependencies (usually defined in deps/repo-deps.packman.xml). These dependencies are added to Python’s sys.path.

  3. omni.repo.man.main(path_to_root) is called. repo_man automatically looks for tools in python sys.path. Each path in sys.path is checked for repo_tools.toml file. Each top level entry in that config can declare a tool, if it contains both command and entry_point field.

  4. repo_man loads repo.toml in the root of the repo to determine which settings to override for each tool.

  5. If user passed a tool to run repo [tool_name] repo_man calls in the tool (using function returned by entry_point) providing resolved configuration and command line options.

Example diagrammed flow from invocation to execution#

./tools/repoman/repoman.py
./tools/packman/packman.cmd
Check deps xmls
package_name='repo_man' version='1.54.4'
package_name='repo_format' version='2.11.0'
Settings
Incoming shell command arguments
CLI Args
Hand off options, settings to entrypoint
Import omni.repo.X module
vendored requirements
repo poetry
poetry download
requirements.txt
Validate repo-tool deps
Importable Module
current project config
repo.toml
repo format configs
repo_tools.toml
repo man configs
repo_tools.toml
./repo.sh OR ./repo.bat
bootstrap
packman
./deps/repo-deps.packman.xml
Requirement List
repo_man-1.54.4
pull repo_man-1.54.4
repo_format-2.11.0
pull repo_format-2.11.0
Completed Pulling Packman Deps
repo_man entrypoint
Merged Config
entrypoints discovery
repo_man process args
format --verbose --modified
repo format execution
clang-format
black