cvsgraph.conf(5)
π cvsgraph.conf β CVS/RCS repository grapher configuration π
okay bestie, so this is cvsgraph.conf(5), from the CVS/RCS Utilities section of the manual. it's the config file for cvsgraph, and it's genuinely a whole vibe. let's get into it π
β¨ OVERVIEW β¨
so the config file is a context free grammar, which sounds scary but fr fr it's chill: empty lines and whitespace are just ignored, they mean nothing, they're not the moment. comments start with # and everything from that # to the end of the line is ignored too π«Ά
a configuration parameter is written like this:
<keyword> = <argument> ;
Keywords are defined down in PARAMETERS. and the argument can be either numerical or string typed β pick your fighter π¦
π’ numbers, numbers, numbers
Numbers can be octal, decimal or hex, like 0117, 79 and 0x4f respectively β¨ Floating point numbers contain a single ., but they must start with a digit (no starting with a lil dot, okay?). and integer numbers are automagically converted to floats if required. love that for them π
π strings
Strings are C-style strings, enclosed in double quotes, and inside them characters may be escaped with \ and written in octal and hex escapes. note that \ must be escaped if it's meant to be an actual character, okay bestie? don't forget π
Escapes recognized are \[abfnrtv], \[xX][0-9a-fA-F]{2} and \[012][0-7]{0,2}.
Some strings get expanded with printf-like conversions that start with %. Not all of them are applicable at all times β in which case they just expand to nothing. so chill π§
Also note that expansions of paths are available with and without a trailing /. that distinction is required for path construction, to make sure that empty expansions won't redirect the path to root, and so no double / gets generated in a path. iconic attention to detail, honestly π
%cβ CVS root including a trailing/if non-empty%Cβ CVS root without trailing/, regardless of how it was entered on the command line%mβ CVS module including trailing/if non-empty%Mβ CVS module without trailing/, regardless of how it was entered on the command line%fβ filename without path (basename<name>functionality)%Fβ filename without path and with,vstripped (basename<name> ,vfunctionality)%pβ path part of filename. this includes a trailing/if the path is non-empty%rβ number of revisions%bβ number of branches%%β literal%%Rβ the revision number (e.g.1.2.4.4)%Pβ previous revision number%Bβ the branch number (e.g.1.2.4)%dβ date of revision%aβ author of revision%sβ state of revision%lβ The log entry of the revision. You need to enableparse_logsfor this to work. You may append an optional truncate length by writing[num](with num the maximum length) directly after%l. If no truncation is specified, then all will be expanded. Specifying a negative truncation length means that newlines should be replaced by spaces. If truncation occurs, then...will be appended. The expansion is scanned for possible HTML entities and are replaced by&#...;equivalents. For example:"%l[25]"will expand up to 25 characters of the log. Note: This expansion is obsolete. Please use"%(%L%)"; see comment below.%Lβ Same as%l, but no HTML entity translations are performed.%tβ current tag of branch or revision%0..%9β command-line argument-0..-9%(...%)β HTMLize the string withing the parenthesis. This is useful to prevent a possible cross site scripting bug when expanding tags into the map generation. For an exploit, you need to have an attack on your CVS server, or you need to be a complete idiot to enter a tag with<,>or"characters. Example: a string"%(%t%)", with tag><script xxx="..."><will expand to><script xxx="..."><and not into the execution of a script. Note: This method is preferred to the%lexpansion, because it is more generic solution (i.e. use"%(%L%)"for log expansions).
π¨ bestie listen β the%lexpansion is obsolete, and the%(...%)method is the preferred one. noted. periodt.
π€ fonts
Fonts are numbered 0..4 (as defined in libgd) where:
0= tiny1= small2= medium (bold)3= large4= giant
π colors
Colors are strings, similar to HTML type colors in the form "#rrggbb" with parts written in hex, where rr = red (00-ff), gg = green (00-ff) and bb = blue (00-ff). so cute, so hex π
π§ conditional expressions
Colors and some strings can also be defined as conditional expressions, so that revision/branch conditions can be repesented visually:
color/string = [ "key" op "content" truecase falsecase ];
Operator op can be one of:
=~β contained in regex=*β contained in regex, case insensitive!~β not contained in regex!*β not contained in regex, case insensitive<β less than string, timestamp or rev/branch number<=β less or equal than string, timestamp or rev/branch number>β greater than string, timestamp or rev/branch number>=β greater or equal than string, timestamp or rev/branch number==β equal than string, timestamp or rev/branch number!=β not equal than string, timestamp or rev/branch number
The content is one of:
- POSIX 1003.2 extended regular expression
- timestamp in UTC format:
YYYY[.MM[.DD[.hh[.mm[.ss]]]]] - revision or branch number
The key can be one of:
stateβ State of the revisionauthorβ The auther of a revisiontagβ both revision- and branch-tagsdateβ date of the revisionrevβ numeric revision- or branch-number
Both truecase and falsecase can be either a (color-)string, as described above, or a new conditional expression. Examples, look at her go πβ¨
rev_bgcolor = [ "state" =~ "dead" "#e08080" "#f0f0f0" ];
branch_color= [ "rev" < "2.1.2" "#000000" [ "tag" =~ "XyZ.*"
"#123456" "#654321" ] ];
rev_idtext = [ "state" == "dead" "Dead %R" "%R" ]
Note that not all colors can be changed on the fly. For example, branch_color cannot be be changed based on revision identification (i.e. author, date or state). The color_bg is always unique and fixed (all expressions will evaluate to the false case). Also, only string rev_text and rev_idtext can be conditional expressions as other do not make much sense to be dynamic. π
β booleans
Booleans have three possible arguments: true, false and not. Not means inverse of what it was (logical negation) and is represented by the value -1. For the configuration file that means that the default value is negated. However, the not possibility is a very handy tool for command line overrides generated from (CGI) scripts π¦
There are several reserved words besides of the keywords. These additional reserved words expand to numerical values:
Booleans:
false = 0
true = 1
not = -1
Alignment specifiers:
left = 0
center = 1
right = 2
Image specifiers:
gif = 0
png = 1
jpeg = 2
Font specifiers:
tiny = 0
small = 1
medium = 2
large = 3
giant = 4
HTML level specifiers:
HTML3 = 1
HTML4 = 2
XHTML = 3
π PARAMETERS π
okay here's the main character section. every single one, no skips, we don't do that here π«Ά
cvsrootstring β The absolute base directory where the CVS/RCS repository can be found. A/will be appended to the string if it is not empty and does not contain a trailing/. Default is an empty string.cvsmodulestring β The module name in the CVS/RCS repository. This is converted into a subdirectory name with a trailing/. Default is an empty string.color_bgcolor β The background color of the image. Default is white ("#ffffff").transparent_bgboolean β The background color of the image is to be the transparent color. This is only useful for PNG images. Be sure to setcolor_bgto something reasonable to make sure that the image is viewable with programs that do not support transparency. Default isfalse.date_formatstring β Thestrftime(3)format string for date and time representation in the%dexpansion. Default is"%d-%b-%Y %H:%M:%S".box_shadowboolean β A boolean whether or not to draw a shadow for the boxes of revisions and branches. Default isfalse.upside_downboolean β Draw the entire tree upside down if set. I.e. highest revisions are at the top of the image. See alsocvsgraph(1)option-u. Default isfalse.left_rightboolean β Draw the entire tree from left to right instead of top down if set. I.e. highest revisions are at the right of the image. You can also draw the tree right to left whenupside_downis set too. Default isfalse.strip_untaggedboolean β Omit all revisions that do not have tags and are not a branch point. This reduces the image-size, but can be confusing when looking for a specific revision. See alsocvsgraph(1)option-s. Default isfalse.strip_first_revboolean β Also omit the first revision in a branch if it does not have tags and is not a branch point. This has only effect ifstrip_untaggedis set. See alsocvsgraph(1)option-S. Default isfalse.auto_stretchboolean β Try to stretch the inter-revision spacing to move the trunks more to the left, effectively reducing the image's size. See alsocvsgraph(1)option-k. Default isfalse.use_ttfboolean β Enable TrueType rendering of strings using the FreeType interface oflibgd. Note that ttf rendering is significantly slower thanlibgd's bitmap fonts. Default isfalse.anti_aliasboolean β Enable antialias rendering of TrueType fonts. This has only effect ifuse_ttfis set. Enablinganti_aliasgives very nice results. However, that is at the expense of 8-bit vs. 4-bit colormap images, which can be a major drawback because the size of 8-bit images is 3..4 times that of 4-bit images (with compressed PNG as output). Default istrue.thick_linesnumber β Set the thickness of connector lines between boxes. Normally, lines are drawn one pixel wide, but can look somewhat thin. Setting the thickness to anything over5would be plain ugly (but hey, who is to debate taste :-). Values less than1and over11are clipped. Default is1.parse_logsboolean β Enable the parsing of the entire,vfile to read the log-entries between revisions. This is necessary for the%lexpansion to work, but slows down parsing by a very large factor. You've been warned. Default isfalse.
πΈ okay soparse_logsis the "you've been warned" one. she's slow. she's worth it if you need%l. your call bestie.
html_levelnumber β tells cvsgraph which flavour of HTML it's serving, bestie, because the generated image map is slightly different for version 3.x, 4.x and XHTML. You can just use the predefined identifiers (HTML3,HTML4andXHTML) to set this value, no math required. The command line option-xoverrides whatever you set here. Default isHTML3(3.x compatibility). iconic, retro, we love her πbranch_ttfontstringbranch_tag_ttfontstringrev_ttfontstringrev_text_ttfontstringtag_ttfontstringtitle_ttfontstringmsg_ttfontstring Set the TrueType font face or filename for the individual elements β one option per element, so yes you can absolutely give your branch labels a different vibe than your error messages. Gd's bitmap fonts are used as a fallback if the font cannot be found or contains errors. (she's got a backup plan, periodt) Default none.branch_ttsizefloatbranch_tag_ttsizefloatrev_ttsizefloatrev_text_ttsizefloattag_ttsizefloattitle_ttsizefloatmsg_ttsizefloat Set the TrueType font size for the individual elements. See also*_ttfontabove, they're besties fr fr. π Default0.0.tag_fontnumber β the font used to draw tags in the revision boxes. Default istiny.tag_colorcolor β the color used to draw tags in the revision boxes. Default is black ("#000000").tag_ignorestring β an extended regular expression as described inregex(7)to match all tags that should not be displayed in the graph. Heads up: a tag will always be displayed if it matches themerge_from/merge_toexpressions, regardless of it being set to ignore here. merge business wins, always β¨ Example:tag_ignore = "(test|alpha)_release.*";Default is empty (no matching occurs).tag_nocaseboolean β ignore the case in regex matching intag_ignore. Default isfalse.tag_negateboolean β negate the matching criteria of thetag_ignoresetting. If set, tags that match thetag_ignorewill be shown, instead of matches being ignored. In any case, tags that matchmerge_from/merge_toexpressions will never be suppressed. flip the whole thing, why not Default isfalse.tag_ignore_mergeboolean β if set, then tags matched withtag_ignorewill no longer be considered for matching bymerge_fromandmerge_to. Default isfalse.rev_fontnumber Default istiny.rev_colorcolor β the color of revision boxes, including the revision number. Default is black ("#000000").rev_bgcolorcolor β revision box background color. This is the interior fill of the box. Default is white ("#ffffff").rev_separatornumber β space between tags in revision boxes. Default is0.rev_minlinenumber β the minimum vertical distance between revision boxes. Default is0.rev_maxlinenumber β the maximum vertical distance between revision boxes. This has only effect ifauto_stretchis set totrue(or option-kis specified). Default is 5 timesrev_minline.rev_lspacenumberrev_rspacenumberrev_tspacenumberrev_bspacenumber Interior spacing in revision boxes of left, right, top and bottom respectively. Note that the left right spacing is not used separately because text is center aligned. (center aligned text said "i don't need two margins") Default is0.rev_idtextconditional string β the revision ID or revision number in a revision box. Default is"%R".rev_textconditional string β the additional text in a revision box under the revision number. Default is"%d".rev_text_fontnumber β the font of the additional text in a revision box under the revision number. Default istiny.rev_text_colorcolor β the font color of the additional text in a revision box under the revision number. Default is black ("#000000").rev_maxtagsnumber β limit the number of tags in a revision box. Old trees tend to have some revisions with extremely many tags attached, which would generate a huge revision box when drawn. Limiting the number is a fair solution. Note that tag sorting is not specified in thercsfile(7), butcvs(1)will normally have the newest tags located before older ones. Therefore, limiting the number of tags would most likely only affect older tags to be stripped. However, no guarantees are given that a specific tag is present when the limit is imposed. An ellipsis (...) is shown in the revision box when the number of tags got truncated. she's doing her best, ok π«Ά Default is0, meaning all tags shown.rev_hidenumberboolean β if set, then no revision number is displayed in the revisionboxes. This reduces size for those graphs where the actual revision-number is irrelevant. (lowkey freeing, the numbers were doing too much) Default isfalse.msg_fontnumber β the font used to draw error and warning messages at the bottom of the graph. Default istiny.msg_colorcolor β the color used to draw error and warning messages. Default is black ("#000000").merge_colorcolor β the color of the lines to show merges. Default is black ("#000000").merge_frontboolean β the merge lines are drawn on top of the image iftrue. Otherwise, merge lines are drawn underneath. Default isfalse.merge_nocaseboolean β ignore the case in regex matching inmerge_fromandmerge_to. Default isfalse.merge_fromstring β themerge_fromis an extended regular expression as described inregex(7)and POSIX 1003.2 (see also Single Unix Specification athttp://www.opengroup.com). The matching tags describe source revisions of merges. Each match is subsequently used in a search for the destination tag as described by themerge_toparameter.
Note: normal string rules apply. Therefore, all backslashes'\'must be escaped, e.g."\."must be written as"\\.". do NOT forget this, bestie, she will not warn you twice π
Example: merge_from = "^from_(.*)"; Default is empty (no matching occurs).
merge_tostring β themerge_tois an extended regular expression with a twist. All subexpressions from themerge_fromare expanded intomerge_tousing%[1-9](in contrast to\[1-9]for backreferences). Care is taken to escape the constructed expression. A'$'at the end of themerge_toexpression can be important to prevent 'near match' references. Normally, you want the destination to be a good representation of the source. However, this depends on how well you defined the tags in the first place. the twist is the whole plot, iykyk π¦ Example:merge_to = "^merge_%1$";Above example, combined with themerge_fromexample would match a tag"from_BugFix_2002"to the merge-destination with tag"merge_BugFix_2002". Default is empty (no matching occurs).merge_findallboolean β normally,merge_from/merge_towill only find the first matching tag-combination and draw a line between them. Ifmerge_findallis set, then all matchingmerge_tos will result in lines from the from-tag to the to-tag. collect them ALL Default isfalse.merge_arrowsboolean β enable the use of arrows pointing to the merge destination. arrows >>> no arrows Default istrue.merge_on_tagboolean β draw merge lines originating from/to the actual tags that are matched whenleft_rightis enabled. This improves the usability of the lines drawn but can under circumstances be difficult to visualize without revision boxes overlapping the lines and arrows. pretty but chaotic, main character energy tbh Default isfalse.merge_cvsntboolean β enable drawing of mergepoints as used by CVSNT. Default istrue.merge_cvsnt_colorcolor β the color of the lines to show merges from mergepoints. Default is black ("#000000").arrow_widthnumberarrow_lengthnumber Specifies the size of the arrow pointing to the merge destination. Default isarrow_width=3,arrow_length=12.branch_fontnumber β the font of the number in a branch box. Default istiny.branch_tag_fontnumber β the font of the tags in a branch box. Default istiny.branch_colorcolor β all branch element's color excluding tags. Default is black ("#000000").branch_bgcolorcolor β branch box background color. This is the interior fill of the box. Default is white ("#ffffff").branch_tag_colorcolor β all branch tags' color. Default is black ("#000000").branch_lspacenumberbranch_rspacenumberbranch_tspacenumberbranch_bspacenumber Interior spacing of branch boxes. Default is0.branch_marginnumber β exterior spacing of branches. Each branch will be spaced with a minimum of this value. personal space but for branches π§ Default is0.branch_connectnumber β length of the vertical connector from a revision to the branch box. Default is0.branch_dupboxboolean β add an extra branch box at the end of the trunk. Useful for upside down drawn trees. If there are no commits on a branch, then no extra box is added, regardless of the setting of this option. Default isfalse.branch_foldboolean β fold branches that have no commits into one branch-box. This helps to reduce the size of the overall image by a huge factor (5..10in most cases). Many applications of CVS use many branches, but not all files in the repository change for each branch. Especially stable files like.cvsignoreor older code tend to accumulate many empty branches at one and the same revision. Folding these branches into one box reduces the width of these images considerably. size reduction arc, we stan π Default istrue.branch_foldallboolean β fold all empty branches that sprout from the same revision in one box. If this option is not set, then multiple boxes will be created if the empty branches are interspaced with ones that have revisions attached. When this option is set, then all empty branches will be collected and put into the box of the first occurring empty branch on the revision's branch point. Setting this option will reduce image size with interspaced commits to the a maximum. maximum slayage π Default isfalse.branch_resortboolean β bestie, this one resorts the branches by how many revisions they have, where less revisions stick closer to the sprouting trunk π±. This reduces image size under circumstances where many branches have significantly different number of revisions. Default isfalse.branch_subtreestring β reduce the tree only to include the subtree from the branch-number given in the argument. If the argument is a revision which is the root of branches, then all those branches will be shown π. The argument can also be a symbolic tag (either a branch- or revision-tag). You normally would set this option from the command line with the-Ooption for interactive flexibility. Example:branch_subtree = "1.2.4";Default is empty (all branches shown).titlestring β the title of the image. Default is empty string.title_xnumber,title_ynumber β position of title. Default is0.title_fontnumber β the font of the title. Default istiny.title_alignnumber β horizontal alignment of the title. Default isleft.title_colorcolor β the color of the title. Default is black ("#000000").margin_topnumber,margin_bottomnumber,margin_leftnumber,margin_rightnumber β margins of the image. Note: the title position is not affected by the margin. Default is0.image_typenumber β image types are available if they can be found in the gd library. Some versions of gd do not have gif, although newer version have it implemented again. CvsGraph will automatically generate png images if gif is not available. Default is dependent on availability and is prioritized in the orderpng,gifandjpeg.image_qualitynumber β the quality of a jpeg image (1..100). Default is100.image_compressnumber β set the compression level of png images (-1..9). Zero means no compression. A higher number means higher compression. Minus one selects the default library setting. Default is-1.image_interlaceboolean β write png and jpeg images in interlaced format. This enables progressive loading in your browser (if supported). Default isfalse.map_namestring β thename=attribute in<map name="mapname">...</map>in the generated HTML map. Default is"CvsGraphImageMap".map_branch_hrefstring,map_rev_hrefstring,map_diff_hrefstring,map_merge_hrefstring β these are thehref=attributes in the<area>tags of HTML. Defaults are:
branch: "href=\"unset: conf.map_branch_href\""
revision: "href=\"unset: conf.map_rev_href\""
diff: "href=\"unset: conf.map_diff_href\""
merge: "href=\"unset: conf.map_merge_href\""
map_branch_altstring,map_rev_altstring,map_diff_altstring,map_merge_altstring β these are thealt=attributes in the<area>tags of HTML. Defaults are"alt=\"%B\"","alt=\"%R\"","alt=\"%P <-> %R\""and"alt=\"%P <-> %R\""respectively.
π AUTHOR π
CvsGraph is written and maintained by B. Stultiens. Send comments and bug reports to cvsgraph@akhphd.au.dk (read the mailnote in the README file first) and visit the homepage at: http://www.akhphd.au.dk/~bertho/cvsgraph/.
π SEE ALSO π
and that's the whole cvsgraph.conf(5) situation, bestie π this page is from version 1.7.0, by B. Stultiens, and the footer didn't give a date β just iconic energy β¨
π¦ where this page comes from
- debian bookworm: cvsgraph 1.7.0-5+b1
- debian trixie: cvsgraph 1.7.0-6
- ubuntu jammy: cvsgraph 1.7.0-5
- ubuntu noble: cvsgraph 1.7.0-6
- ubuntu resolute: cvsgraph 1.7.0-6build1
- ubuntu stonking: cvsgraph 1.7.0-6build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms