From ea3f5574889a0190d86fb05e52de979d477a5bc0 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Wed, 28 Jan 2026 16:00:45 +0000 Subject: [PATCH 1/4] change method of ignoring files --- github_scripts/get_git_sources.py | 29 +++++++++-------------------- 1 file changed, 9 insertions(+), 20 deletions(-) diff --git a/github_scripts/get_git_sources.py b/github_scripts/get_git_sources.py index 323afbed..66a64aad 100644 --- a/github_scripts/get_git_sources.py +++ b/github_scripts/get_git_sources.py @@ -134,26 +134,15 @@ def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: # Create a clean clone location loc.mkdir(parents=True) - exclude_dirs = ( - "applications/*/working", - "applications/*/test", - "applications/*/bin", - "science/*/working", - "science/*/test", - "science/*/bin", - "interfaces/*/working", - "interfaces/*/test", - "interfaces/*/bin", - "components/*/working", - "components/*/test", - "components/*/bin", - "infrastructure/*/working", - "infrastructure/*/test", - "infrastructure/*/bin", - "mesh_tools/*/working", - "mesh_tools/*/test", - "mesh_tools/*/bin", - ) + exclude_dirs = [] + result = run_command(f"git -C {repo_source} --ignored -s") + for ignore_file in result.stdout.split(): + ignore_file = ignore_file.strip() + if not ignore_file.startswith("!!"): + continue + ignore_file = ignore_file.removeprefix("!!") + ignore_file = ignore_file.strip() + exclude_dirs.append(ignore_file) # Trailing slash required for rsync command = f"rsync -av {repo_source}/ {loc}" From a68191c92d46bfebe43c3b5ce8d0eab8d31a13c9 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Thu, 29 Jan 2026 08:42:18 +0000 Subject: [PATCH 2/4] update to use ssh --- github_scripts/get_git_sources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/github_scripts/get_git_sources.py b/github_scripts/get_git_sources.py index 66a64aad..87e76414 100644 --- a/github_scripts/get_git_sources.py +++ b/github_scripts/get_git_sources.py @@ -135,7 +135,8 @@ def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: loc.mkdir(parents=True) exclude_dirs = [] - result = run_command(f"git -C {repo_source} --ignored -s") + host, path = repo_source.split(":", 1) + result = run_command(f"ssh {host} git -C {repo_source} status --ignored -s") for ignore_file in result.stdout.split(): ignore_file = ignore_file.strip() if not ignore_file.startswith("!!"): From e2d3c04d8ac6ba991cb2af36223339c4a2a61dd3 Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Thu, 29 Jan 2026 08:43:42 +0000 Subject: [PATCH 3/4] debug message --- github_scripts/get_git_sources.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/github_scripts/get_git_sources.py b/github_scripts/get_git_sources.py index 87e76414..c1c41a1c 100644 --- a/github_scripts/get_git_sources.py +++ b/github_scripts/get_git_sources.py @@ -136,7 +136,7 @@ def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: exclude_dirs = [] host, path = repo_source.split(":", 1) - result = run_command(f"ssh {host} git -C {repo_source} status --ignored -s") + result = run_command(f"ssh {host} git -C {path} status --ignored -s") for ignore_file in result.stdout.split(): ignore_file = ignore_file.strip() if not ignore_file.startswith("!!"): @@ -144,6 +144,7 @@ def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: ignore_file = ignore_file.removeprefix("!!") ignore_file = ignore_file.strip() exclude_dirs.append(ignore_file) + print(exclude_dirs) # Trailing slash required for rsync command = f"rsync -av {repo_source}/ {loc}" From 577e54c9b1468321a862618d009290f264028c3b Mon Sep 17 00:00:00 2001 From: James Bruten <109733895+james-bruten-mo@users.noreply.github.com> Date: Thu, 29 Jan 2026 09:16:53 +0000 Subject: [PATCH 4/4] fix split --- github_scripts/get_git_sources.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/github_scripts/get_git_sources.py b/github_scripts/get_git_sources.py index c1c41a1c..ca233975 100644 --- a/github_scripts/get_git_sources.py +++ b/github_scripts/get_git_sources.py @@ -137,14 +137,12 @@ def sync_repo(repo_source: str, repo_ref: str, loc: Path) -> None: exclude_dirs = [] host, path = repo_source.split(":", 1) result = run_command(f"ssh {host} git -C {path} status --ignored -s") - for ignore_file in result.stdout.split(): + for ignore_file in result.stdout.split("\n"): ignore_file = ignore_file.strip() if not ignore_file.startswith("!!"): continue - ignore_file = ignore_file.removeprefix("!!") - ignore_file = ignore_file.strip() + ignore_file = ignore_file.removeprefix("!!").strip() exclude_dirs.append(ignore_file) - print(exclude_dirs) # Trailing slash required for rsync command = f"rsync -av {repo_source}/ {loc}"