vc_fetch_status

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

Source code:


    if { [nsv_exists vc_status_cache $path] }  {
	set status_info [nsv_get vc_status_cache $path]
	# If the mtime hasn't changed, return the cached status.
	if { [lindex $status_info 0]  == [file mtime $path] } {
	    return [lindex $status_info 1]
	}
	# mtime has changed, so kill the cache entry
	nsv_unset vc_status_cache $path
    }

    # Get the status report.

    if {[catch {
	
	set status [vc_exec "status [vc_path_relative $path]"]
	
    } errmsg]} {
	ns_log Error "vc_fetch_status: $errmsg"
	set status ""
    }

    if ![empty_string_p $status] {
	nsv_set vc_status_cache $path [list [file mtime $path] $status]
    }

    return $status


philg@mit.edu