Purpose: to list commonly appearing CVS messages (in particular those that MacCVS Pro produces) and explain what they mean (in particular: whether they are signs of trouble and how to fix the problem in question).
The Alpha Dev > AlphaTcl CVS menu now contains a command named Get MacCVS Pro Messages which incorporates the AppleEvent procedure described below.
Archives
Two annoying things with the Message & Errors window:
this is controlled by a session preference. Go to Session Settings and select the panel Messages and Other. There is check box named Automatically clear message window. Uncheck it to prevent from clearing.
There is however a possibility to save the window with an AppleEvent. Here is a proc which wraps around this AE and saves the messages window into a folder called CvsMessages in Alpha's main folder.
proc saveCvsMessages {} {
global HOME
set res [tclAE::build::resultData 'Mcvs' core getd \
---- [tclAE::build::propertyObject Msgs \
[tclAE::build::indexObject docu -1]]]
set date [mtime [now]]
regsub -all " " $date "_" date
regsub -all "\[/:\]" $date "-" date
if {![file exists [file join $HOME ":CvsMessages"]]} {
file mkdir [file join $HOME ":CvsMessages"]
}
set fid [open [file join $HOME ":CvsMessages:CvsMsg_$date"] w+]
puts $fid $res
close $fid
status::msg "CVS messages saved in 'CvsMsg_$date'"
}Bernard
(03/03/12) Here is a better version which names the output file after the name of the project to make it easier to distinguish which project it comes from. If your MacCVS project is Foo.maccvs, the messages will be stored in Foo_date_time (eg Foo_12-03-03_11-21 today at 11:21 am). More informative than CvsMsg_12-03-03_11-21. Note that the Message window, in MacCVS Pro, must be the topmost window.
proc saveCvsMessages {} {
global HOME
set name [tclAE::build::resultData 'Mcvs' core getd \
---- [tclAE::build::propertyObject pnam \
[tclAE::build::indexObject cwin 1]]]
regexp {[^\.]+} $name name
set txt [tclAE::build::resultData 'Mcvs' core getd \
---- [tclAE::build::propertyObject Msgs \
[tclAE::build::indexObject docu -1]]]
set date [mtime [now]]
regsub -all " " $date "_" date
regsub -all "\[/:\]" $date "-" date
if {![file exists [file join $HOME ":CvsMessages"]]} {
file mkdir [file join $HOME ":CvsMessages"]
}
set outname [string range "${name}_$date" 0 30]
set fid [open [file join $HOME ":CvsMessages:$outname"] w+]
puts $fid $txt
close $fid
status::msg "CVS messages saved in '$outname'"
}