[cvsnt] Module information
lists at connectionbrazil.com
Wed Oct 3 13:52:58 BST 2007
Thomas Jensen wrote:
> I am not trying to disallow export, I want to disallow all commands BUT
> export on a specific module in my repo.
I understood that. But I think it's not really relevant for your problem.
> I have a precommand file that looks like this:
> ALL C:/precmdtest.bat $USER %r %c %d
> This bat file is called without problems and this is
> the output of the bat file:
> User: cvsadmin
> Location: /TESTREPO
> Command: update
> Timestamp: "Wed Oct 3 07:21:57 2007"
This shows that it is called, but it doesn't show /how/ it is called.
> BUT even though it calls EXIT 1 in the :deny section, it doesnt stop the
> cvsnt server.
As Arthur said, CVSNT may not see the .bat file's return code but the
cmd.exe return code -- which not necessarily is the same.
I don't know cmd.exe intimately because I don't use it, but you can
experiment a bit with it to determine how its return code handling works.
Make sure you call your batch files with "cmd.exe /c <batch file>" and then
check the return code of that command (which is different from running a
batch file in the same session and checking its return code).
If the return code passing should be a problem, you could also try running
your scripts as .cmd files instead of .bat files, or set the ERRORLEVEL
variable explicitly before exiting, or use a batch file compiler to create
an .exe from your script (which you can call directly, without going
through cmd.exe), or use a different script -- Windows Script Host (VBS,
More information about the cvsnt