How to get uninterpreted timeline output on command line?
(1.2) By Andy Bradford (andybradford) on 2025-03-22 15:56:19 edited from 1.1 [link] [source]
With all the recent changes it seems that now I'm not able to get the timeline in an uninterpreted form. I have timeline-plaintext set to 1, so shouldn't it just output the timeline without converting HTML and interpreting [...] and other things? Is there a different setting that needs to be tweaked? Otherwise, how do I get just the uninterpeted timeline output? [EDIT: Hopefully I'm using the correct description. Perhaps I should call it "rendered" instead of "interpreted"] It looks like this commit made it so the the CLI timeline is "rendered": https://www.fossil-scm.org/home/info/6ab9994de6a5b3ca Should this perhaps be conditional on the timeline-plaintext setting? Thanks, Andy
(2) By Florian Balmer (florian.balmer) on 2025-03-23 07:04:28 in reply to 1.2 [link] [source]
This post implies that timeline-plaintext
should be the default, again,
but I think there's some incompatible changes how links with descriptions are
displayed in the CLI timeline. It seems it's no longer possible to see the link
target in the CLI timeline, only the description.
As I'm working mostly with the CLI timeline, this indeed seems not very handy, as it's no longer possible to copy hyperlinks from the terminal.
(3) By Florian Balmer (florian.balmer) on 2025-03-23 08:11:59 in reply to 2 [link] [source]
BTW: This seems to work fine in the web UI, where timeline-plaintext=1
shows
the description and target of hyperlinks.
I hope we can get this back for the CLI, too.
(4) By Florian Balmer (florian.balmer) on 2025-03-25 15:30:06 in reply to 1.2 [link] [source]
Thanks for the fix!
As of this check-in, the help for commit
says:
Commit message text is interpreted as fossil-wiki format.
This is not correct: it depends on the timeline-plaintext
setting, and maybe
others. Should this be reverted?
In the same commit, I noticed that the help text for the --branchcolor
and
--bgcolor
options was changed to discourage their use, and later removed
entirely.
That's the stuff I'm using almost daily! And I always forget the spelling, and
whether --bgcolor
is for branches or for the current check-in only.
Apart from causing inconveniences, I still don't think it's a good idea to hide
features from users. If Fossil removes support for the bgcolor
tag, then the
help text for the options to set it could go away, but otherwise I think it
should be kept to avoid confusion.
Especially with regard to recent help
command enhancements, I think a complex
system becomes even more complex if it's incompletely documented.
Any chance this can be restored?
(5) By Jörgen Kosche (jkosche) on 2025-03-25 15:43:34 in reply to 4 [link] [source]
As of this check-in, the help for commit says:
Commit message text is interpreted as fossil-wiki format.
This is not correct: it depends on the timeline-plaintext setting, and maybe others. Should this be reverted?
You are talking about this checkin? I asked for it, because I saw people using formatted commit-messages and didn't figure out how, because the help didn't say anything. All the cool features stay unused if nobody learns about them. Maybe the text could be amended, but I think the help should have a notice to help people use that feature.
(8) By Florian Balmer (florian.balmer) on 2025-03-25 16:32:54 in reply to 5 [link] [source]
You are talking about this checkin?
Yes, I'm sorry I messed up the links in my post.
I think it's okay to give a hint about the format. But the current version is incorrect.
(6) By Stephan Beal (stephan) on 2025-03-25 16:14:18 in reply to 4 [link] [source]
In the same commit, I noticed that the help text for the --branchcolor and --bgcolor options was changed to discourage their use, and later removed entirely.
bgcolor and branchcolor have been discouraged since fossil got skin support (well more than 10 years ago), as it's impossible to hard-code color values which are legible with arbitrary skins. Removing them from the help text simply formalizes that discouragement.
(7) By Florian Balmer (florian.balmer) on 2025-03-25 16:32:50 in reply to 6 [link] [source]
Removing them from the help text simply formalizes that discouragement.
So did adding the help text hint that they're discouraged, without making it more complicated for people relying on the feature to look it up. So I don't agree this is the right way to deprecate well-established features.
(9) By Richard Hipp (drh) on 2025-03-25 17:37:38 in reply to 7 [link] [source]
.. people relying on the feature ...
It's not a "feature", it's a "misfeature". It was a bad idea. It was a mistake. I regret adding it to the code in the first place. I have since learned that it works far better to let Fossil choose its own colors, automatically.
If you insist on choosing colors yourself, then that's on you. You can do what you want on your own repositories. But I do not want to lure newbies into thinking choosing their own colors is a good idea. So we won't be advertising the --bgcolor and --branchcolor options. I grudgingly accept that they exist, but they do not belong in the help-text.
(10) By Florian Balmer (florian.balmer) on 2025-03-25 18:04:37 in reply to 9 [source]
What if there was way to lighten or darken (according to the skin) user-specified background colors, to get enough contrast to foreground colors to ensure readability?
In my patched version of Fossil, I'm doing this1 the IE-compatible
way with semi-transparent white SVG backgrounds, but maybe there's also newer
methods like the CSS filter
or background-blend-mode
properties (which I
couldn't get to work, so far).
It's especially handy to say --bgcolor="red"
for a commit with a bug, or
--bgcolor="green"
for a release. And then have the background color lightened
up to make the black foreground text comfortably readable, or darkened for white
foreground text.
Should I investigate in a generalization of this feature to revive the background and branch colors? Because the Fossil auto-generated colors are somewhat limited to 4 or 5 hues with difficult-to-distinguish variants (press F5 a few times).
Or is the feature deprecated, anyway?
- ^ Because Fossil's auto-generated branch colors used to be too dark for me to read with black foreground text; this has been relieved a bit with overhaul of the color-generator, since then.
(11) By Richard Hipp (drh) on 2025-03-25 18:18:53 in reply to 10 [link] [source]
It's especially handy to say --bgcolor="red" for a commit with a bug, or --bgcolor="green" for a release.
Handy for you, maybe. But then somebody else comes along and wants to view your work using a different skin or with --darkmode, and then they can't read it at all.
If you can come up with an algorithm that translates a hard-coded color (ex: #ff0000) into some alternative color appropriate for the current skin, that would be terrific. Please share your work. Then maybe we can translate the (usually garish) colors chosen by the average user into something more pleasing, and resurrect the --bgcolor and --branchcolor options.
(12) By Florian Balmer (florian.balmer) on 2025-03-25 18:36:06 in reply to 11 [link] [source]
Ok, I'll share my work and new ideas here.
I'm somewhat busy, at the moment, but as soon as I can get to it, I'll start a new thread.
Just noting another idea:
Calling window.getComputedStyle(<element>).backgroundColor
returns "rgb(255,
0, 0)"
even if the original style assigned by CSS was "red"
, "#ff0000"
or
"#f00"
, so maybe that's a (client-side) way to get a normalized form of ANY
user-specified color, then apply some (HSL?) formula to lighten or darken it,
depending on what's suitable for the current skin.
(13) By Warren Young (wyoung) on 2025-03-25 18:36:24 in reply to 11 [link] [source]
come up with an algorithm
Terminal themes take the 8 colors in 2 brightness levels defined by ANSI X3.64 and redefine them to work with the background color. The program emits the color code for “bright red” but the user sees “pinkish-mauve.”
(14) By Richard Hipp (drh) on 2025-03-26 00:13:52 in reply to 11 [link] [source]
So now on trunk, there is a new routine that filters user-requested background colors to try to make them less ghastly. Notes:
There is test page: /test-bgcolor.
There are probably some uses of user-requested background colors that I have not yet filtered out.
It just occurred to me that there should probably be a new setting to disable the color-filter, as I'm sure there are some users out there who prefer their to have their background color requests fulfilled exactly as written, however heinous those requests may be. But the color-filter needs to be on by default. If you want ugly colors, you first have to search out and turn on the ugly-color setting.
(15) By Richard Hipp (drh) on 2025-03-26 00:22:38 in reply to 14 [link] [source]
The TCL devs often pick their own background colors. I have not yet updated the main TCL server on core.tcl-lang.org. But I have updated the server running this forum, which also serves mirror1.tcl.tk. Behold the difference:
(17) By Stephan Beal (stephan) on 2025-03-26 00:25:26 in reply to 15 [link] [source]
Behold the difference:
Add &skin=darkmode
to those to see an even starker improvement.
(18) By Mike Swanson (chungy) on 2025-03-26 00:27:35 in reply to 17 [link] [source]
Big improvement in both the light and dark themes, well done!
(21) By Andy Bradford (andybradford) on 2025-03-26 03:57:22 in reply to 15 [link] [source]
> Behold the difference: The new code on mirror1.tcl.tk appears to make the colors easier to consume, indeed for certain skins, but when do I get my greyscale timeline? ;-) Thanks, Andy
(16) By Mike Swanson (chungy) on 2025-03-26 00:25:04 in reply to 14 [link] [source]
I'd pitch in the opinion to hold off on the color-filter setting. There's a pretty good balance in the new feature, providing a requested feature, but holding back from totally shooting yourself in the foot. (I suppose you could set every branch to the same color, but that'd be a you problem. 😀)
(19) By Stephan Beal (stephan) on 2025-03-26 00:28:10 in reply to 16 [link] [source]
I'd pitch in the opinion to hold off on the color-filter setting.
FWIW, 100% agreed.
Experience suggests that we'll eventually get a request from someone who wants their exact colors, but as George Clooney's character so elegantly put it in Dusk 'til Dawn:
It's not a problem until you make it a problem.
(22) By Florian Balmer (florian.balmer) on 2025-03-26 05:36:18 in reply to 14 [link] [source]
Wow, super cool! Thank you!
Another test page:
- https://fossil-scm.org/home/brlist?colors=on&skin=default
- https://fossil-scm.org/home/brlist?colors=on&skin=darkmode
I haven't studied your solution, yet, but it looks really nice. I haven't checked all the details, for example, whether the color of the rails is also adjusted, or whether this is not necessary.
And, from some quick tests on the new /test-bgcolor
page, it seems only "long
forms" (#RRGGBB
) of colors are handled, but not "short forms" (#RGB
), maybe
this could be added.
And I was also thinking of adding a table to convert named HTML colors to RGB to allow fixing these, as well.
My approach with transparent background colors is alpha-blending the branch color against the background color, as summarized here.
(20.1) By Andy Bradford (andybradford) on 2025-03-26 02:30:34 edited from 20.0 in reply to 11 [link] [source]
> But then somebody else comes along and wants to view your work using a > different skin or with --darkmode, and then they can't read it at all. What about an option to disable explicitly chosen colors? The timeline has 5 viewing options from which the user can choose to influence how the timeline is presented. I personally prefer the "Classic View". Others prefer another. How about a checkbox or option that allows them to choose which way the colors should be rendered? Automatic Timeline Colors vs Fixed Timeline Colors. Or whatever. Just a thought. Andy