doctools::cvs(3tcl)

πŸ“¦
version 2.0 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– doctools::cvs β€” the manual, but make it cute πŸ’–

okay bestie, so this is doctools::cvs, part of the Tcllib documentation tools (that's the 3tcl section, iykyk). It's all about chewing up cvs log output and making it do what you want. let's get into it πŸŽ€


✨ NAME ✨

doctools::cvs β€” processing text in 'cvs log' format


🌸 SYNOPSIS 🌸

package require Tcl 8.5 9

package require textutil

package require doctools::cvs ?1.1?

::doctools::cvs::scanLog text evar cvar fvar

::doctools::cvs::toChangeLog evar cvar fvar

πŸ¦‹ DESCRIPTION πŸ¦‹

so this package hands you Tcl commands for processing and reformatting text that's in the format the cvs log command spits out. iconic behavior honestly.

the commands ::doctools::cvs::scanLog and ::doctools::cvs::toChangeLog are derived from code found on the Tcl'ers Wiki [http://wiki.tcl.tk]. the references live at the end of the page, go look πŸ‘€


πŸ‘‘ API πŸ‘‘

::doctools::cvs::scanLog text evar cvar fvar

this one takes text and parses it, assuming it's a CVS log like cvs log generates. the info it pulls out goes into the variables whose names you passed as evar, cvar, and fvar. ✨

bestie, important: info that's already in those referenced variables is preserved β€” that's on purpose, so the caller can merge data from multiple logs into one database. slay.

varname evar (in)

has to point at a scalar variable. after the call, this variable holds a list of all the entries found in the log file. an entry is identified by the combo of date and author, and can be split across multiple physical entries β€” one per touched file. πŸ’…

heads up: the entries are listed in the same order they were found in the text. that is not necessarily sorted by date or author. no cap.

each item in the list is itself a list of two elements: the date of the entry, and its author, in that order. the date is formatted as year/month/day.

varname cvar (in)

has to point at an array variable. the keys are strings containing the date and author of log entries, in this order, separated by a comma. πŸ“

the values are lists of comments made for the entry.

varname fvar (in)

has to point at an array variable. the keys are strings containing date, author of a log entry, and a comment for that entry, in this order, separated by commas.

the values are lists of the files the entry is touching.


::doctools::cvs::toChangeLog evar cvar fvar

the three arguments here are the same as the last three arguments of ::doctools::cvs::scanLog. plot twist though: this command expects them to be filled with info about one or more logs. it takes that info and converts it into text in the format of a ChangeLog as accepted and generated by emacs. 🌈

the constructed text is returned as the result of the command. periodt.


😭 BUGS, IDEAS, FEEDBACK 😭

this document, and the package it describes, will undoubtedly contain bugs and other problems. πŸ’€ pls report such in the category doctools of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist]. also pls report any ideas for enhancements you may have for either the package and/or the documentation.

when proposing code changes, please provide unified diffs, i.e. the output of diff -u.

note further that attachments are strongly preferred over inlined patches. attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar. 🫢

🧚 SEE ALSO 🧚


πŸ’œ KEYWORDS πŸ’œ

changelog, cvs, cvs log, emacs, log


⭐ CATEGORY ⭐

Documentation tools


Copyright (c) 2003-2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>


okay that's the whole thing, bestie, you ate that πŸŽ€ this was doctools::cvs, version 1.1, from tcllib, dated 1.1, living in the doctools::cvs(3tcl) manual. go forth and parse some logs πŸ’…βœ¨πŸ¦‹

πŸ“¦ where this page comes from