vc_fetch_summary

one of the documented procedures in this installation of the ACS
Usage:
vc_fetch_summary   path
What it does:
Returns the CVS summary report for a file, caching it based on mtime.
Defined in: /web/philip/tcl/vc-defs.tcl

Source code:


    if { [nsv_exists vc_summary_cache $path] }  {
	set info [nsv_get vc_summary_cache $path]
	if { [lindex $info 0] == [file mtime $path] } {
	    return [lindex $info 1]
	} else {
	    # mtime has changed, kill the cache
	    nsv_unset vc_summary_cache $path
	}
    }

    # Get the summary information and cache it.

    set summary  ""
    set entries "[file dirname $path]/CVS/Entries"
    set tail    "[file tail $path]"
    if [file exists $entries] {
	set summary [read [set fp [open $entries r]]]
	close $fp
	if [regexp "/$tail/(\[^\n\]+)" $summary match info] {
	    set summary "/$tail/$info"
	    nsv_set vc_summary_cache $path [list [file mtime $path] $summary]
	}
    }

    return $summary


philg@mit.edu