`fossil tag list` do not prints tag's values
(1) By gapsf (gapsf0) on 2024-04-03 09:02:51 [source]
$ fossil version
This is fossil version 2.24 [452f8e1ffc] 2024-03-26 15:36:00 UTC
Commands to reproduce:
fossil init --project-name "tagbug" tagbug.fossil
fossil open tagbug.fossil -k
echo test > ./test.txt
fossil add test.txt
fossil commit -m "test file is added"
fossil tag add tag_name1 trunk tag_value1
fossil timeline
fossil tag list
Output is:
project-name: tagbug
project-id: cc6024aa32277df2c47a2778da57ad461fc85e5c
server-id: 4053c3cb9bf90fd45f2889da28c51c04669be8c3
admin-user: antivink (initial password is "6BfWAymku4")
project-name: tagbug
repository: /home/a/antivink/a0/tmp/1/tagbug.fossil
local-root: /home/a/antivink/a0/tmp/1/
config-db: /home/a/antivink/.config/fossil.db
project-code: cc6024aa32277df2c47a2778da57ad461fc85e5c
checkout: e6adcc2273ce5add84bddaa8f01dec05d2c994be 2024-04-03 08:52:16 UTC
tags: trunk
comment: initial empty check-in (user: antivink)
check-ins: 1
ADDED test.txt
New_Version: d8574c62fc7d0be4d1932147ef4fccb67445f2e892fbc40d1ed833fcaf710e2c
=== 2024-04-03 ===
08:52:16 [a7e7f22745] Edit [d8574c62fc7d0be4|d8574c62fc]: Add tag "tag_name1" with note "tag_value1". (user: antivink)
08:52:16 [d8574c62fc] *CURRENT* test file is added (user: antivink tags: trunk, tag_name1)
08:52:16 [e6adcc2273] initial empty check-in (user: antivink tags: trunk)
+++ no more data (3) +++
tag_name1
trunk
so value is not printed for tag_name1
At the same time tag's values shown in fossil ui
:
http://localhost:8082/ci_tags/d8574c62fc7d0be4
Tags and Properties for Check-in d8574c62fc
branch=trunk inherited from [e6adcc2273]
sym-tag_name1=tag_value1 added by [a7e7f22745] on 2024-04-03 08:52:16
sym-trunk inherited from [e6adcc2273]
Screenshot: https://ibb.co/5FcZgfj
(2) By Stephan Beal (stephan) on 2024-04-03 11:25:54 in reply to 1 [link] [source]
so value is not printed for tag_name1
To the best of my recollection, tag values have never been shown there (though they are in the web ui). Except for the tags assigned via branching, tag values are rarely used, so this shortcoming apparently hasn't bothered anyone enough to change it.
@Anyone who wants to patch it: to avoid breaking scripting output, emitting of tag values should require an extra flag, e.g. --verbose (noting that -v is already used for something else).
(4) By Andy Bradford (andybradford) on 2024-04-03 20:53:16 in reply to 2 [link] [source]
> Anyone who wants to patch it I'm not sure it's necessary and in fact I think it would be wrong because that is not what "fossil tag list" is intended to show. It will already list the values of the tags when you give it a specific hash to inspect, but when using it without a hash, it simply shows you all aggregate tags and none of the specific values which could potentially change over time. If I'm not mistaken... Andy
(6) By Daniel Dumitriu (danield) on 2024-04-04 08:42:20 in reply to 4 [link] [source]
I won't say it's necessary, but I can see it being useful for some workflows. And with Stephan's remark that it must be done as an extra flag, it won't change anything for those that do not want/need it. I might take a shot at it.
(7) By Daniel Dumitriu (danield) on 2024-04-04 14:04:02 in reply to 6 [link] [source]
I committed an attempt on a separate branch. There is a new option --values
that turns value listing on: if --sep SEP
ist also given, the (possible multiple) values for a single tag are listed on the same line as the tag, separated by SEP
; otherwise each value is listed on its own line (and thus the tag name appears on multiple lines).
Please test and report back.
(9) By Andy Bradford (andybradford) on 2024-04-04 22:23:58 in reply to 7 [link] [source]
> Please test and report back. Seems to work: $ fossil tag list --raw --values --sep , branch b,really,trunk sym-alpha beta,omega sym-athena sym-b sym-really sym-trunk $ fossil tag list --raw --values branch b branch really branch trunk sym-alpha beta sym-alpha omega sym-athena sym-b sym-really sym-trunk But I can see that "branch" tag getting really long over time. Indeed, it's quite the show to run "fossil tag list --raw --values" (with and without --sep) against the Fossil repository itself. $ fossil tag list --raw --values | wc 5598 25211 273999 As you say, there may be someone who wants or needs this so it could be useful in some contexts. Andy
(8) By Andy Bradford (andybradford) on 2024-04-04 22:08:49 in reply to 6 [link] [source]
> I won't say it's necessary, I suppose what I was really trying to point out is that what the OP posted regarding the UI displaying the tags and their values already has an analog with the "fossil tag list ARTIFACT-ID" functionality. The "fossil tag list" command is not the same as the UI page that was referenced. Indeed, I'm not sure if the UI even has such functionality. Andy
(3) By Andy Bradford (andybradford) on 2024-04-03 20:51:02 in reply to 1 [link] [source]
> so value is not printed for tag_name1 It is if you run: fossil tag list ARTIFACT-ID Also: fossil tag list --raw ARTIFACT-ID Please try "fossil tag list trunk" or "fossil tag list d8574c62fc7d0be" instead. Andy
(5.1) By Andy Bradford (andybradford) on 2024-04-03 20:58:25 edited from 5.0 in reply to 1 [link] [source]
> "fossil tag list" do not prints tag's values I'm going to claim this is working as designed. It may not be very well documented, but the help does say: fossil tag list|ls ?OPTIONS? ?ARTIFACT-ID? List all tags or, if ARTIFACT-ID is supplied, all tags and their values for that artifact.
(10) By patmaddox on 2024-04-11 00:35:48 in reply to 1 [link] [source]
I would like to see this added.