summaryrefslogtreecommitdiff
path: root/bin/just-import-git.py
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2025-01-09 09:54:24 +0100
committerMaksim Denisov <denisov.maksim@huawei.com>2025-01-09 10:14:32 +0100
commitf04737301d691cfda3382a6dd3cb97776c31895c (patch)
treea892b1deca05b4a0c84fbe6eb92d1b586f193d30 /bin/just-import-git.py
parent211f89f0a305ead6eb36ce7811cb2c294167535c (diff)
downloadjustbuild-f04737301d691cfda3382a6dd3cb97776c31895c.tar.gz
Support import of "tree structure" roots
Diffstat (limited to 'bin/just-import-git.py')
-rwxr-xr-xbin/just-import-git.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/just-import-git.py b/bin/just-import-git.py
index d53e55db..7cf3f7c7 100755
--- a/bin/just-import-git.py
+++ b/bin/just-import-git.py
@@ -168,7 +168,7 @@ def get_repo_to_import(config: Json) -> str:
def get_target_if_computed_repo(repo: Json) -> Optional[str]:
"""If repository is computed, return the target repository name."""
- if repo.get("type") == "computed":
+ if repo.get("type") in ["computed", "tree structure"]:
return cast(str, repo.get("repo"))
return None
@@ -276,7 +276,7 @@ def rewrite_repo(repo_spec: Json,
existing_repos: List[str] = repo.get("repositories", [])
new_repos = [assign[k] for k in existing_repos]
repo = dict(repo, **{"repositories": new_repos})
- elif repo.get("type") == "computed":
+ elif repo.get("type") in ["computed", "tree structure"]:
target: str = repo.get("repo", None)
repo = dict(repo, **{"repo": assign[target]})
if absent and isinstance(repo, dict):