summaryrefslogtreecommitdiff
path: root/bin/just-import-git.py
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-02-19 11:33:32 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2025-02-20 15:33:51 +0100
commit377b216dea73254f8d8e37868484be69a746678a (patch)
tree7b8fab9501393f8398d2586cedc07c8f928c6624 /bin/just-import-git.py
parent8b4dbd31cc55e15a364f568ec2aec3d856b1bebe (diff)
downloadjustbuild-377b216dea73254f8d8e37868484be69a746678a.tar.gz
just-import-git: Fix missing inherited pragmas
Update CHANGELOG accordingly.
Diffstat (limited to 'bin/just-import-git.py')
-rwxr-xr-xbin/just-import-git.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/just-import-git.py b/bin/just-import-git.py
index 4a070445..b75deb5c 100755
--- a/bin/just-import-git.py
+++ b/bin/just-import-git.py
@@ -268,9 +268,18 @@ def rewrite_repo(repo_spec: Json,
repo = assign[repo]
elif repo.get("type") == "file":
changes = {}
+ # take subdir
subdir: str = os.path.normpath(repo.get("path", "."))
if subdir != ".":
changes["subdir"] = subdir
+ # keep ignore special and absent pragmas
+ pragma = {}
+ if cast(Json, repo).get("pragma", {}).get("special", None) == "ignore":
+ pragma["special"] = "ignore"
+ if cast(Json, repo).get("pragma", {}).get("absent", False):
+ pragma["absent"] = True
+ if pragma:
+ changes["pragma"] = pragma
repo = dict(remote, **changes)
elif repo.get("type") == "distdir":
existing_repos: List[str] = repo.get("repositories", [])