repo_on_fire.application
Repo on fire main application.
Application
The repo-on-fire application.
Source code in repo_on_fire/application.py
14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |
workspace
property
Utilities to manipulate a repo workspace.
__init__(configuration=None)
Create a new instance of the app.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
configuration
|
Optional[Configuration]
|
The configuration to use. If not given, load from default settings files. |
None
|
Source code in repo_on_fire/application.py
17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
init_workspace_from_cache(manifest_url, manifest_name, manifest_branch, args, workspace_path=None)
Initialize a workspace from the cache.
This runs a "special" init command, which will create a workspace from a mirror workspace in the app's cache. If the mirror workspace does not exist, it will be created first. On top, the cache entry will be kept up to date by running a sync on it every time the init command is run.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
manifest_url
|
str
|
The URL of the repository where the repo manifest is stored. |
required |
manifest_name
|
Optional[str]
|
The name of the manifest file within the repository. |
required |
manifest_branch
|
Optional[str]
|
The branch in the manifest repository to use. |
required |
args
|
List[str]
|
Additional arguments to be passed to the init command run in the target workspace. |
required |
workspace_path
|
Optional[Path]
|
The path to where the workspace shall be created. If omitted, the current working directory will be used. |
None
|
Source code in repo_on_fire/application.py
69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | |
list_config(print_as_json=False)
Print the configuration settings used by the app.
Source code in repo_on_fire/application.py
106 107 108 109 110 111 112 113 | |
run_native_repo_command(command, args, cwd=None)
Runs a native repo command.
This runs the repo tool with the given command and arguments.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
command
|
str
|
The command to run (e.g. init, sync, ...). |
required |
args
|
List[str]
|
A list of additional options to pass to repo. |
required |
cwd
|
Optional[Path]
|
The directory where to run repo. If omitted, run in the current working directory. |
None
|
Source code in repo_on_fire/application.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
run_repo(args, cwd=None)
Run the repo tool.
This runs repo passing it the given arguments. Note that injection of additional arguments does not work with this method!
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
args
|
List[str]
|
The arguments to pass to repo, including the sub-command (if any). |
required |
cwd
|
Optional[Path]
|
The directory where to run. If omitted, run in the current directory. |
None
|
Source code in repo_on_fire/application.py
56 57 58 59 60 61 62 63 64 65 66 67 | |
show_config_file_path(print_as_json=False)
Print the path to the configuration file.
Source code in repo_on_fire/application.py
98 99 100 101 102 103 104 | |