Page History

Turn Off History

External Tools Cookbook

Just some notes on where I'm going with #183. Currently, I'm just playing with trivial things that can be done from the command-line. Custom processor scripts would make things way more powerful. And don't forget that scripts have access to QUERY_STRING, so being able to build CGI-type forms should be feasible.

Files

Blame

permissions asio, command line:

  /usr/bin/cvs -n -d '%RP' rannotate -r `expr '%V1' \| HEAD` '%F' 2>&1

Graph

permissions asio, command line (see attached script):

  /home/cpb/src/scripts/cvstrac_graphvers.pl --filename='%F'
                   --database='%RP/%P.db' --baseurl='%B/'

Directories

ChangeLog

permissions asoi, command line:

  /usr/bin/cvs -d '%RP' rlog '%F' 2>/dev/null |
          /usr/bin/cvs2cl --stdin  --stdout --rcs '%RP' 2>&1

Note that cvs2cl only handles the --rcs style when there's no trailing '/' in the repository path.

Tickets

Close Ticket

permissions asw, command line:

  /usr/bin/sqlite3 '%RP/%P.db'
         "UPDATE ticket SET status='closed' WHERE tn='%TN';"

The user gets redirected back to /tktview since there's no output. Unless there's a failure.

Check-ins

Pass/Fail

permissions asi, command-line:

  /usr/bin/sqlite3 '%RP/%P.db'
   "INSERT INTO inspect(cn,inspecttime,inspector,result)
   VALUES('%CN','%N','%U','failed|passed')"

The user gets redirected back to /chngview since there's no output. Unless there's a failure.

Wiki

Formatting

permissions asj. Different from /wiki.txt in that the output is inlined into the CVSTrac page, not just as straight text/plain.

  echo '<pre>' && cat '%C' && echo '</pre>'

Attachments: