1doctools::cvs(n) Documentation tools doctools::cvs(n)
2
3
4
5______________________________________________________________________________
6
8 doctools::cvs - Processing text in 'cvs log' format
9
11 package require Tcl 8.2
12
13 package require textutil
14
15 package require doctools::cvs ?1?
16
17 ::doctools::cvs::scanLog text evar cvar fvar
18
19 ::doctools::cvs::toChangeLog evar cvar fvar
20
21______________________________________________________________________________
22
24 This package provides Tcl commands for the processing and reformatting
25 text in the format generated by the cvs log command.
26
27 The commands ::doctools::cvs::scanLog and ::doctools::cvs::toChangeLog
28 are derived from code found on the Tcl'ers Wiki [http://wiki.tcl.tk].
29 See the references at the end of the page.
30
32 ::doctools::cvs::scanLog text evar cvar fvar
33 The command takes the text and parses it under the assumption
34 that it contains a CVS log as generated by cvs log. The result‐
35 ing information is stored in the variables whose names were
36 specified via evar, cvar, and fvar.
37
38 Already existing information in the referenced variables is pre‐
39 served, allowing the caller to merge data from multiple logs
40 into one database.
41
42 varname evar (in)
43 Has to refer to a scalar variable. After the call this
44 variable will contain a list of all the entries found in
45 the log file. An entry is identified through the combina‐
46 tion of date and author, and can be split over multiple
47 physical entries, one per touched file.
48
49 It should be noted that the entries are listed in the
50 same order as they were found in the text. This is not
51 necessarily sorted by date or author.
52
53 Each item in the list is a list containing two elements,
54 the date of the entry, and its author, in this order. The
55 date is formatted as year/month/day.
56
57 varname cvar (in)
58 Has to refer to an array variable. Keys are strings con‐
59 taining the date and author of log entries, in this or‐
60 der, separated by a comma.
61
62 The values are lists of comments made for the entry.
63
64 varname fvar (in)
65 Has to refer to an array variable. Keys are strings con‐
66 taining date, author of a log entry, and a comment for
67 that entry, in this order, separated by commas.
68
69 The values are lists of the files the entry is touching.
70
71
72 ::doctools::cvs::toChangeLog evar cvar fvar
73 The three arguments for this command are the same as the last
74 three arguments of the command ::doctools::cvs::scanLog. This
75 command however expects them to be filled with information about
76 one or more logs. It takes this information and converts it into
77 a text in the format of a ChangeLog as accepted and generated by
78 emacs. The constructed text is returned as the result of the
79 command.
80
82 This document, and the package it describes, will undoubtedly contain
83 bugs and other problems. Please report such in the category doctools
84 of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist]. Please
85 also report any ideas for enhancements you may have for either package
86 and/or documentation.
87
88 When proposing code changes, please provide unified diffs, i.e the out‐
89 put of diff -u.
90
91 Note further that attachments are strongly preferred over inlined
92 patches. Attachments can be made by going to the Edit form of the
93 ticket immediately after its creation, and then using the left-most
94 button in the secondary navigation bar.
95
97 [uri, http://wiki.tcl.tk/log2changelog
98
100 changelog, cvs, cvs log, emacs, log
101
103 Documentation tools
104
106 Copyright (c) 2003-2008 Andreas Kupries <andreas_kupries@users.sourceforge.net>
107
108
109
110
111tcllib 1 doctools::cvs(n)