On 2010, Sep 14, at 09:17 , Paul Eggert wrote: > On 09/14/2010 12:01 AM, Guido Sette wrote: >> I "intuitively" know how the system works, but it is not clear to me the >> steps required >> to inject a checksum for each revision (As a comment into the file itself? >> As a separate file?). > > It could be done either way. The comment could be inserted with "ci -m'put > your checksum here' file". > A separate file could be maintained in parallel with the original. Perhaps > the comment would > be simpler. >
Thank you for the pointers. For now, this short bash script I concocted seems to work. Any checksumming could be used instead of md5. ############################ #! /bin/bash # # cimd5.sh file_name "log message" # # file_name gets expanded with $1 # "log message" gets expanded with $2 # and appended right after the md5 checksum. # # Any other option to ci can of course be appended checksum=`md5 -q $1` eval "ci -m'$checksum $2'" $1 ############################ Any advice on how to improve that approximative code? Now, if only I could find a way to automatically verify the checksum at checkout... Thanks again, Guido Sette
