diff options
author | LaMont Jones <lamontjones@google.com> | 2022-04-12 23:33:59 +0000 |
---|---|---|
committer | LaMont Jones <lamontjones@google.com> | 2022-04-14 14:31:47 +0000 |
commit | d8de29c4472e2f744a1bed37d7ec8710b1feebb8 (patch) | |
tree | 116c796b8272e056d377fde5eca123ecc8a1cb0c | |
parent | 2cc3ab7663ae867c6103bcf5c90a8e9e7999c15e (diff) | |
download | git-repo-d8de29c4472e2f744a1bed37d7ec8710b1feebb8.tar.gz |
forall: fix multi-manifest variables.
- REPO_PATH is relative to the root of the client. REPO_OUTERPATH is not
needed.
- REPO_INNERPATH is relative to the sub manifest root.
- REPO_OUTERPATH is the path for the sub manifest root relative to the
root of the client.
Change-Id: I031692891cfef2634d1358584d27a6a4df735c20
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/334899
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: LaMont Jones <lamontjones@google.com>
-rw-r--r-- | subcmds/forall.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/subcmds/forall.py b/subcmds/forall.py index cc578b52..f9f34e33 100644 --- a/subcmds/forall.py +++ b/subcmds/forall.py | |||
@@ -84,6 +84,11 @@ REPO_PROJECT is set to the unique name of the project. | |||
84 | 84 | ||
85 | REPO_PATH is the path relative the the root of the client. | 85 | REPO_PATH is the path relative the the root of the client. |
86 | 86 | ||
87 | REPO_OUTERPATH is the path of the sub manifest's root relative to the root of | ||
88 | the client. | ||
89 | |||
90 | REPO_INNERPATH is the path relative to the root of the sub manifest. | ||
91 | |||
87 | REPO_REMOTE is the name of the remote system from the manifest. | 92 | REPO_REMOTE is the name of the remote system from the manifest. |
88 | 93 | ||
89 | REPO_LREV is the name of the revision from the manifest, translated | 94 | REPO_LREV is the name of the revision from the manifest, translated |
@@ -290,8 +295,9 @@ def DoWork(project, mirror, opt, cmd, shell, cnt, config): | |||
290 | env[name] = val | 295 | env[name] = val |
291 | 296 | ||
292 | setenv('REPO_PROJECT', project.name) | 297 | setenv('REPO_PROJECT', project.name) |
293 | setenv('REPO_PATH', project.relpath) | 298 | setenv('REPO_OUTERPATH', project.manifest.path_prefix) |
294 | setenv('REPO_OUTERPATH', project.RelPath(local=opt.this_manifest_only)) | 299 | setenv('REPO_INNERPATH', project.relpath) |
300 | setenv('REPO_PATH', project.RelPath(local=opt.this_manifest_only)) | ||
295 | setenv('REPO_REMOTE', project.remote.name) | 301 | setenv('REPO_REMOTE', project.remote.name) |
296 | try: | 302 | try: |
297 | # If we aren't in a fully synced state and we don't have the ref the manifest | 303 | # If we aren't in a fully synced state and we don't have the ref the manifest |