The "tag" command:
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 check-ins, 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:
- --date-override DATETIME
- Set date and time added
- -n|--dry-run
- Display the tag text, but do not actually insert it into the database
- --propagate
- Propagating tag
- --raw
- Raw tag name. Ignored for non-CHECK-IN artifacts.
- --user-override USER
- Name USER when adding the tag
- --root
- If ARTIFACT-ID refers to an artifact with a P-card, it gets translated to the oldest parent of that artifact and --propagate is assumed. This is most useful with forum posts, wiki pages, and tech notes, where tags are most easliy managed via their initial version.
The --date-override and --user-override options support importing history from other SCM systems. DATETIME has the form 'YYYY-MM-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-".
When tagging forum posts, the ARTIFACT-ID is translated to the initial version of that post and --propagate is implied.
- 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 -n|--dry-run option to see what would have happened. Certain tag name prefixes are forbidden, as documented for the 'add' subcommand.
Options:
- --date-override DATETIME
- Set date and time deleted
- -n|--dry-run
- Display the control artifact, but do not insert it into the database
- --raw
- Raw tag name. Ignored for non-CHECK-IN artifacts.
- --user-override USER
- Name USER when deleting the tag
- --root
- As described for 'add'.
- fossil tag find ?OPTIONS? TAGNAME
- List all objects that use TAGNAME.
Options:
- -n|--limit N
- Limit to N results
- --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.
- fossil tag list|ls ?OPTIONS? ?ARTIFACT-ID?
- List all tags or, if ARTIFACT-ID is supplied, all tags and their values for that artifact. 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:
- -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.
- --raw
- List raw names of tags
- --sep SEP
- Separator when concatenating values
- --tagtype TYPE
- List only tags of type TYPE, which must be one of: cancel, singleton, propagated
- --values
- List tag values If --sep is supplied, list all values of a tag on the same line, separated by SEP; otherwise list each value on its own line.
- --root
- As described for 'add' and only 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.