Check-in by ben on 2025-11-12 16:01:21
After reaching the download limit, emit equivalent fossil
commands where the archive file items would have been.
INSERTED DELETED
18 7 coprolit.awk
18 7 TOTAL over 1 changed file
Index: coprolit.awk
==================================================================
--- coprolit.awk
+++ coprolit.awk
@@ -209,19 +209,30 @@
info(out, sprintf("Comment: %s", comment))
} else {
info(out, "Comment:")
wrap("info", out, comment, 65)
}
- if (is_checkin && has_downloads) {
+ if (is_checkin) {
info(out, "")
info(out, "Downloads:")
- slug = sprintf("%s/tarball/%s/%s-%s.tar.gz",
- _root, commit, _conf["short-project-name"], commit)
- item(out, "9", "Tarball", slug, _server, _port)
- slug = sprintf("%s/zip/%s/%s-%s.zip",
- _root, commit, _conf["short-project-name"], commit)
- item(out, "9", "Zip archive", slug, _server, _port)
+ if (has_downloads) {
+ slug = sprintf("%s/tarball/%s/%s-%s.tar.gz",
+ _root, commit, _conf["short-project-name"], commit)
+ item(out, "9", "Tarball", slug, _server, _port)
+ slug = sprintf("%s/zip/%s/%s-%s.zip",
+ _root, commit, _conf["short-project-name"], commit)
+ item(out, "9", "Zip archive", slug, _server, _port)
+ } else {
+ info(out,
+ sprintf("Tarball: fossil tarball %s %s-%s.tar.gz --name %s",
+ commit, _conf["short-project-name"],
+ commit, _conf["short-project-name"]))
+ info(out,
+ sprintf("Zip: fossil zip %s %s-%s.zip --name %s",
+ commit, _conf["short-project-name"],
+ commit, _conf["short-project-name"]))
+ }
}
info(out, "")
info(out, "SHA3-256:")
info(out, " " hash)