This is an automated email from the ASF dual-hosted git repository.
sbp pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
The following commit(s) were added to refs/heads/main by this push:
new 346ef50 Allow individual files to be replaced when moving release
files
346ef50 is described below
commit 346ef5075702f51d26b01af6098ab5a81b1475f0
Author: Sean B. Palmer <[email protected]>
AuthorDate: Mon Nov 3 16:25:10 2025 +0000
Allow individual files to be replaced when moving release files
---
atr/util.py | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/atr/util.py b/atr/util.py
index 849887f..4618588 100644
--- a/atr/util.py
+++ b/atr/util.py
@@ -239,7 +239,13 @@ async def create_hard_link_clone(
await _clone_recursive(source_entry_path, dest_entry_path)
elif entry.is_file():
if not dry_run:
- await aiofiles.os.link(source_entry_path,
dest_entry_path)
+ try:
+ await aiofiles.os.link(source_entry_path,
dest_entry_path)
+ except FileExistsError:
+ if not exist_ok:
+ raise
+ await aiofiles.os.remove(dest_entry_path)
+ await aiofiles.os.link(source_entry_path,
dest_entry_path)
elif dry_run and (await
aiofiles.os.path.exists(dest_entry_path)):
raise ValueError(f"Destination path exists:
{dest_entry_path}")
# Ignore other types like symlinks for now
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]