72
73
74
75
76
77
78
79
80
81
82
83
84
85
|
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
|
+
+
+
|
# f-tag -a current -t bgcolor -v '#ffff33'
# Propagate the bg color starting at a commit:
# f-tag -a current -t '*bgcolor' -v '#ffff33'
# Cancel that color:
# f-tag -a current -t -bgcolor -v 'that was uglier than i thought it would be'
# Change the checkin comment on the current checkout:
# f-tag -a current -t comment -v '...new comment...'
</pre></nowiki>
Values are always optional but Fossil internally treats some tag names specially and may require (or expect) a value. The <tt>bgcolor</tt> tag is one example. When cancelling a tag, the value is always optional, regardless of whether or not it is a special tag.
When adding a tag, the tag name may optionally be prefixed with a <tt>+</tt> sign, for symmetry with the cancel (<tt>-</tt>) and propagate (<tt>*</tt>) markers. Cancel tags might <em>look</em> like options/flags because they start with a minus, but they are not interpreted as a flag due to a happy accident of design. When using propagating tags, it is wise to enclose the tag in quotes to prevent any unwanted side-effects of shell globbing. Optionally, use <tt>-t=*tagname</tt>, which would only match a glob in the most unusual of circumstances. Likewise, <tt>-t=-tag-to-cancel</tt> can be used if having the tag value look like a flag seems disturbing to you.
Note that the +/-/* prefixes were not chosen arbitrarily: they reflect how Fossil internally stores and recognizes the type of a tag: <tt>+</tt> represents an "add tag", <tt>-</tt> a "cancel tag" (a.k.a. "anti-tag"), and <tt>*</tt> a propagating tag.
|