Page History
- 2009-May-18 04:24 anonymous
- 2008-Jun-09 12:45 anonymous
- 2006-Jul-18 19:50 cpb
- 2006-Jul-18 17:22 anonymous
- 2004-Jun-01 11:52 anonymous
- 2003-Jul-31 10:48 anonymous
- 2003-Apr-03 20:52 anonymous
- 2003-Mar-12 03:48 anonymous
- 2003-Feb-27 01:38 anonymous
- 2003-Feb-23 20:18 anonymous
- 2003-Jan-30 19:28 anonymous
- 2003-Jan-30 14:35 anonymous
- 2003-Jan-29 19:43 anonymous
- 2003-Jan-06 14:27 anonymous
- 2002-Dec-01 23:47 anonymous
- 2002-Dec-01 23:22 anonymous
- 2002-Dec-01 23:09 anonymous
Since CVSTrac now has support for using an external 'diff' program (see checkin [229]), I wrote a small filter program to accomplish this, similar to the output of cvsview.
The output is marked up using CSS styles, so customizing the appearance should be simple enough for anyone who cares enough.
Example output
A sample output is viewable at http://afs.codefactory.se/user/daniel/diff2html/sample.html
Where to get it The program is available at:
- http://afs.codefactory.se/user/daniel/diff2html/
- or if you use the AFS distributed file system: /afs/codefactory.se/user/daniel/diff2html/
Setting up colored diffs
In the setup section of CVSTrac, under 'Diff Programs', add something like:
rcsdiff -q -r%V1 -r%V2 -u '%F' | diff2html
That should work right away.
Using the included stylesheet
Also under setup, under 'Heders & Footers', make sure to link to the stylesheet as any regular CSS stylesheet.
A sample (probably overly simplified) header:
<html> <head> <link rel="stylesheet" type="text/css" ref="http://afs.codefactory.se/user/daniel/diff2html/diff2html.css"> </head>
Caveat: gawk 3.0.4 chokes on diff2html with the following error message: gawk: diff2html:93: fatal: match() cannot have 3 arguments
Rui Carmo: I also came across this problem, so I rigged up with this 6-line awk script that does everything I need (just pipe the rcsdiff output through it and define matching CSS classes on the page header):
BEGIN { print "<pre>" } END { print "</pre>" } /^-/ { print "<span class=cvstrac-diff-deletion>" $0 "</span>" } /^+/ { print "<span class=cvstrac-diff-addition>" $0 "</span>" } /^@/ { print "<span class=cvstrac-diff-position>" $0 "</span>" } { print $0 }