Artifact 16ca0eb0f2f96ba15d3f8f168868a88fbd0f8d58dc00f699214bb58959b01923:
- File
internal/sync/links_test.go
-
2026-10-13 14:49:38
— part of check-in
[a565d1c467]
on branch feat/425-share-links
— feat(sync): add share-links mode for pragma req-links and link
sync-protocol-01 Section 9.5 makes share-links mode OPTIONAL. With SyncOpts.ShareLinks a pulling session sends pragma req-links in its first request, as fossil's --share-links does, unless SyncOpts.ProjectCode names another project. It keeps each pragma link URL ARG MTIME as config link:URL = ARG, defossilized and otherwise verbatim, replacing an existing link only with a strictly newer MTIME. A wrong token count, a URL that is not HTTP(S) or an MTIME that is not a positive decimal drops the link.
Where fossil 2.28 differs the draft is followed: fossil fails fatally on a link URL its parser rejects and reads MTIME with strtoll base 0.
New sync.9.5 client cases run against fossil sync --share-links as well. SP-9.5-4 loses its scope note and is covered; SP-9.5-5 and SP-9.5-6 are new rows for which links a client keeps and when it sends req-links.
Tracked in #425. (user: [email protected], size: 2177) [annotate] [blame] [check-ins using]
-
2026-10-13 15:25:21
— part of check-in
[5473c06942]
on branch main
— feat(sync): add share-links mode for pragma req-links and link (#428)
* feat(sync): add share-links mode for pragma req-links and link
sync-protocol-01 Section 9.5 makes share-links mode OPTIONAL. With SyncOpts.ShareLinks a pulling session sends pragma req-links in its first request, as fossil's --share-links does, unless SyncOpts.ProjectCode names another project. It keeps each pragma link URL ARG MTIME as config link:URL = ARG, defossilized and otherwise verbatim, replacing an existing link only with a strictly newer MTIME. A wrong token count, a URL that is not HTTP(S) or an MTIME that is not a positive decimal drops the link.
Where fossil 2.28 differs the draft is followed: fossil fails fatally on a link URL its parser rejects and reads MTIME with strtoll base 0.
New sync.9.5 client cases run against fossil sync --share-links as well. SP-9.5-4 loses its scope note and is covered; SP-9.5-5 and SP-9.5-6 are new rows for which links a client keeps and when it sends req-links.
Tracked in #425.
* test(sync): cover links in later rounds and push+pull req-links; match project code case-insensitively (user: [email protected], size: 2177) [annotate] [blame] [check-ins using]
-
2026-10-13 14:49:38
— part of check-in
[a565d1c467]
on branch feat/425-share-links
— feat(sync): add share-links mode for pragma req-links and link