trevorcook.dev  Help: tag

The "tag" command:

Usage: fossil tag SUBCOMMAND ...

Run various subcommands to control tags and properties.

fossil tag add ?OPTIONS? TAGNAME ARTIFACT-ID ?VALUE?

Add a new tag or property to an artifact referenced by ARTIFACT-ID. For checkins, the tag will be usable instead of a CHECK-IN in commands such as update and merge. If the --propagate flag is present and ARTIFACT-ID refers to a wiki page, forum post, technote, or check-in, the tag propagates to all descendants of that artifact.

Options:

--raw
Raw tag name. Ignored for non-CHECK-IN artifacts.
--propagate
Propagating tag.
--date-override DATETIME
Set date and time added.
--user-override USER
Name USER when adding the tag.
-n|--dryrun
Display the tag text, but do not actually insert it into the database.

The --date-override and --user-override options support importing history from other SCM systems. DATETIME has the form 'YYYY-MMM-DD HH:MM:SS'.

Note that fossil uses some tag prefixes internally and this command will reject tags with these prefixes to avoid causing problems or confusion: "wiki-", "tkt-", "event-".

fossil tag cancel ?--raw? TAGNAME ARTIFACT-ID

Remove the tag TAGNAME from the artifact referenced by ARTIFACT-ID, and also remove the propagation of the tag to any descendants. Use the the -n|--dryrun option to see what would have happened. Certain tag name prefixes are forbidden, as documented for the 'add' subcommand.

Options:

--raw
Raw tag name. Ignored for non-CHECK-IN artifacts.
--date-override DATETIME
Set date and time deleted.
--user-override USER
Name USER when deleting the tag.
-n|--dryrun
Display the control artifact, but do not insert it into the database.

fossil tag find ?OPTIONS? TAGNAME

List all objects that use TAGNAME.

Options:

--raw
Interprets tag as a raw name instead of a branch name and matches any type of artifact. Changes the output to include only the hashes of matching objects.
-t|--type TYPE
One of: ci (check-in), w (wiki), e (event/technote), f (forum post), t (ticket). Default is all types. Ignored if --raw is used.
-n|--limit N
Limit to N results.

fossil tag list|ls ?OPTIONS? ?ARTIFACT-ID?

List all tags or, if ARTIFACT-ID is supplied, all tags and their values for that artifact. The tagtype option accepts one of: propagated, singleton, cancel. For historical scripting compatibility, the internal tag types "wiki-", "tkt-", and "event-" (technote) are elided by default unless the --raw or --prefix options are used.

Options:

--raw
List raw names of tags
--tagtype TYPE
List only tags of type TYPE, which must be one of: cancel, singleton, propagated
-v|--inverse
Inverse the meaning of --tagtype TYPE.
--prefix
List only tags with the given prefix. Fossil-internal prefixes include "sym-" (branch name), "wiki-", "event-" (technote), and "tkt-" (ticket). The prefix is stripped from the resulting list unless --raw is provided. Ignored if ARTIFACT-ID is provided.

The option --raw allows the manipulation of all types of tags used for various internal purposes in fossil. It also shows "cancel" tags for the "find" and "list" subcommands. You should not use this option to make changes unless you are sure what you are doing.

If you need to use a tagname that might be confused with a hexadecimal baseline or artifact ID, you can explicitly disambiguate it by prefixing it with "tag:". For instance:

fossil update decaf

will be taken as an artifact or baseline ID and fossil will probably complain that no such revision was found. However

fossil update tag:decaf

will assume that "decaf" is a tag/branch name.