-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Claus Henriksen <[EMAIL PROTECTED]> writes:
> for those interested I have updated John Cavanaugh's CVS patch and > perlscripts that provides a branch-protection mechanishm, so that it > is compatible with CVS 1.12.5 . > > Here it is > > http://www.motimeter.dk/branchprotector > > It works ok as far as I have tested. Any comments are welcome. Hint. The use of context or a unified diff would probably be 'better' for http://www.motimeter.dk/branchprotector/commit-patch-1.12-5.diff in case folks are running other custom-patches in their cvs sources. Also, most folks would rather see a forward patch rather than a reverse patch. diff -c2p commit.1.12.5.c commit.c or diff -up commit.1.12.5.c commit.c might generate a more portable patch for your audience. That said, be advised that the use of sprintf() could open you up to a buffer overrun if the argument is close to PATH_MAX in length. I suggest you may wish to use snprintf and pass in the size of argBuf. Or, failing that, do the length check yourself snprintf(argBuf, sizeof argBuf, "%s:%s:%s:%s", p->key, type_stat, tag_stat, li->rev_old); you should also compare the return value from snprintf() to ensure that it has everything you needed or malloc the argBuf and try again... As you have said, this patch is not a candidate for future versions of cvs, but I am sure there are a number of folks who will take advantage of your work, so do try to be a bit more paranoid. Enjoy! -- Mark Note: for our listening public it is possible to write a commitinfo trigger with the stock cvs which performs the tag checking of each file - From inside the commitinfo script using 'cvs -n status' on the list of files (or even by reading the CVS/Entries file if you like to live dangerously). -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/+cpo3x41pRYZE/gRAva6AJ44fFQSZQfB/L67dXHfQvSjL7GvXwCeLLtY 2ZoJMqd28Ds/v9ND6TNqqzA= =l/8H -----END PGP SIGNATURE----- _______________________________________________ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
