Warnings for broken hyperlinks in check-in comments
(1) By Richard Hipp (drh) on 2025-03-10 18:53:09 [link] [source]
The latest trunk of Fossil (20250310184208) looks for suspicious and/or broken hyperlinks in check-in comments and if it find them, give the user an opportunity to continue editing the check-in comment to perhaps fix the problem.
Broken hyperlinks in check-in comments are a persistent problem. Everybody does it from time to time. Broken hyperlinks can be fixed by editing the check-in comment after-the-fact, but we'd like to avoid that.
I'm wondering if this new warning mechanism is helpful or just annoying. Please compile from trunk, if you can, and try it out. Post your feedback below. This feature can be removed if it turns out to do more harm than good.
(2) By spindrift on 2025-03-10 20:33:58 in reply to 1 [link] [source]
Can I check that the veracity of hyperlinks is checked only by inspection and not by actually attempting to visit the link (which could cause all sorts of tomfoolery and chaos).
I have no doubt it is the former, but I would like to be reassured.
(3.1) By Richard Hipp (drh) on 2025-03-10 20:55:18 edited from 3.0 in reply to 2 [link] [source]
That depends on the link. External hyperlinks, yes, certainly - it makes no attempt to validate those except for syntax. But some internal links are checked. For example, if you just put a check-in HASH as the link target, it will complain if no such artifact exists in the repository.
If you want to test this yourself, you can run:
./fossil commit --allow-empty --dry-run
The --dry-run option prevents a real check-in, but it will allow you to go through the whole type-in-a-commit-comment process, and the resulting error checking.
Note that I make no claim that the current algorithm is one true and perfect arbitrator of what is and is not a good check-in comment. Far from it. The current precedure just checks for the really obvious stuff. If this concept proves out, we can go back in later and make the validity checker smarter.
The current procedure finds things like:
- Using markdown hyperlink syntax by mistake
- Omitting the ":" in interwiki links such as
[forum:/forumpost/feed652201c110e7]
(4) By Florian Balmer (florian.balmer) on 2025-03-16 19:45:24 in reply to 1 [link] [source]
Post your feedback below.
I didn't write because I was happy this didn't affect comments entered by command-line options. Now I'm switching to the "annoyed" camp.
(5) By anonymous on 2025-03-16 19:55:05 in reply to 4 [link] [source]
Why? Without known what's annoying you it's impossible to tell if it is fixable or if it needs to be removed.
(6) By Florian Balmer (florian.balmer) on 2025-03-16 20:09:43 in reply to 4 [link] [source]
Why? Without known what's annoying you it's impossible to tell if it is fixable or if it needs to be removed.
For example, I have a project with a module named ENGINE ][
...
I think programmers seriously making commits to source code repositories can be expected to be familiar with SCM comment syntax and to be careful enough to review their input, no need for all the bells and whistles ...
Because my next fear is that we add an AI interface to verify the contents of comments, and maybe even the checked-in code ... ;-)
(7) By Richard Hipp (drh) on 2025-03-16 23:06:25 in reply to 4 [link] [source]
You can run:
fossil set verify-comments off
Add the --global flag if you really want to disable this feature everywhere. On your own head be it. Note that the new "verify-comments" setting does not show up in the output of "fossil settings" unless you either use the --extra option, or unless the value for verify-comments is different from the default ("on"). So likely you will be the only person in the world to see it and nobody else will be troubled by the extra setting.
(8) By Florian Balmer (florian.balmer) on 2025-03-17 06:27:33 in reply to 7 [link] [source]
fossil set verify-comments off
Ok, thank you.
It was in no way my intent to trigger addition of yet another setting to Fossil, but you asked for feedback, so I submitted my opinion.
Does the setting sync? And do(es) the other setting(s) for markdown comments sync? Should they? (As the former is a private special setting only for me, it probably shouldn't. But the other(s)?)
BTW: Comments entered through amend
or /ci_edit are not checked. Is
this by design, or an oversight?
(9) By Andy Bradford (andybradford) on 2025-03-18 02:40:29 in reply to 7 [link] [source]
> So likely you will be the only person in the world to see it and > nobody else will be troubled by the extra setting. I'll take that chance. I disable automated spelling "checkers" as well. Thanks for the option to disable it. Andy
(15) By DB (ACB) on 2025-03-18 22:41:05 in reply to 9 [link] [source]
I can understand disabling "autocorrect" spell checkers and I do, but having typos flagged... I've found it to be very useful. Perhaps the software doing the checking won't allow you to add new words to its vocabulary?
After using monochrome code editors for a long time I was blown away with syntax coloring, so many simple bugs have been avoided so quickly. That may be a too cumbersome feature to add to fossil.
(16) By Daniel Dumitriu (danield) on 2025-03-18 22:53:40 in reply to 15 [link] [source]
syntax coloring... That may be a too cumbersome feature to add to fossil.
It has been done.
(17) By Stephan Beal (stephan) on 2025-03-18 23:25:42 in reply to 16 [link] [source]
It has been done.
See also what is currently the bottom most section of https://sqlite.org/wasm/doc/tip/doc-maintenance.md. That site's embedded docs make heavy use of highlight.js.
(10.1) By Andy Bradford (andybradford) on 2025-03-18 02:57:29 edited from 10.0 in reply to 1 [link] [source]
> The latest trunk of Fossil (20250310184208) looks for Interesting... since when do hashes show up as timestamps? Or did you actually compose the post using a timestamp? Thanks, Andy
(11) By spindrift on 2025-03-18 07:00:43 in reply to 10.1 [link] [source]
Not sure how long it has been possible for, but long enough for me to have read about it a few times
(12) By Richard Hipp (drh) on 2025-03-18 10:03:24 in reply to 10.1 [link] [source]
You can use a timestamp to identify a check-in, as long as it is unique (and it usually is). So, for example, the following URLs are equivalent:
- https://fossil-scm.org/home/timeline?c=20250310184209z
- https://fossil-scm.org/home/timeline?c=3e87f78e6019f2eb
Likewise:
This has been true for time out of mind. But I've recently started using timestamp names more frequently, as it conveys more information about the check-in (specifically how old the checkin is) than the canonical hash.
For best results, use the full the full 14-digit timestamp (though the 12-digit timestamp that omits the seconds also works as of a fix I made yesterday) with the "Z" at the end to indicate "Zulu" or "Universal Coordinated Time" instead of your local timezone.
There are still some issues with this. For example, the timestamp needs to occur at the same instant or after than the actual timestamp on the check-in, not before. So in the examples above, I had to type "20250310184209" not "20250310184208" even though the time shows as 2025-03-10 18:42:08, because the actual time of the check-in is 2025-03-10 18:42:08.506. I need to improve the rounding behavior to fix this, but until I get that done, you can just round the actual date up to the next second. Or even to the next minute (202503101843Z works), if there aren't any other checkins closely following.
Another thing to keep in mind is that the date of a checkin can be modified using the "date" tag. So if you create a link, and then the date gets moved, that link might not work any more.
(13) By Richard Hipp (drh) on 2025-03-18 11:10:16 in reply to 12 [link] [source]
Check-in 202503181104z improves rounding behavior for timestamp identifiers. After that check-in (which is already installed on the server running this forum), the identifier "20250310184208z" correctly resolves to check-in 3e87f78e6019f2eb even though the timestamp on that check-in is 2025-03-10 18:42:08.506.
(18) By Mike Swanson (chungy) on 2025-03-19 17:30:56 in reply to 13 [source]
The behavior still changes if I opt to put deliminators in the URL. For instance, /info/20250318110445Z and /info/2025-03-18T11:04:45Z point to two different commits. I feel the latter is more readable, and the rounding code should probably apply equally to both string formats.
(19) By Richard Hipp (drh) on 2025-03-19 18:04:05 in reply to 18 [link] [source]
Now fixed.
(14) By Andy Bradford (andybradford) on 2025-03-18 13:44:03 in reply to 12 [link] [source]
> You can use a timestamp to identify a check-in ... This has been true > for time out of mind. Yes, I was aware of the c= parameter to timeline (and use it often when looking for commits around a certain date), and I guess I never thought to use it with /info, so that's an interesting application. I guess that I've never seen it used this way in the forum check-in hash substitution thingy so it stood out as somehow novel. Thanks, Andy