[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Thu, 04 Oct 2001 22:18:35 +0100
Don't know if anyone is interested, but a very simple hack
to implement a dirinfo is to add the following code
if(( n = Parse_Info( CVSROOTADM_DIRINFO, repository, precommit_proc, 1
error(0, 0, "Pre-check for directory add failed (%s)", repository
I put the code in the add_directory() function, using precommit_proc()
commit.c as my callback. Works very nicely, thanks to whoever wrote
And, of course, change precommit_proc from static to not static.
CVSROOTADM_DIRINFO is #defined in cvs.h as "dirinfo",.
It would probably be more correct to create a "prediradd_proc()" or
:~/cvs-1.11/src/cvtest/b$ cvs add testing_testing/
DIRINFO SCRIPT TEST: /home/rbresner/CVREPO/cvtest/b
Hello. You are rbresner, you may NOT ADD A DIR!!
cvs add: Pre-check for directory add failed
Useful? Maybe to some. Changes:
I put the add_directory() changes near the comment:
/* There used to be some code here which would prompt for
whether to add the directory. The details of that code had
bitrotted, but more to the point it can't work
client/server, doesn't ask in the right way for GUIs, etc.
A better way of making it harder to accidentally add
directories would be to have to add and commit directories
like for files. The code was #if 0'd at least since CVS 1.5. */
Probably, the change could go earlier, but it seemed appropriate there.
|[Prev in Thread]
||[Next in Thread]|
- "dirinfo" hack,
R Bresner <=