RE: verifymsg not called if user variable undefined
"Lemke, Michael IZ/HZA-IC1" <[email protected]>
| Newsgroups | gmane.comp.version-control.cvs.bugs,gmane.comp.version-control.cvs.general |
|---|---|
| Message-ID | <[email protected]> |
> From: Mark D. Baushke > > Lemke, Michael IZ/HZA-IC1 writes: > > > Nice idea for a workaround but it doesn't work. Apparently > cvs bails > > out as soon as it sees the undefined variable. I also > tried a script > > instead of /bin/false. It isn't called. > > Ah, a pity. > > > Is this considered desired behavior? I find it rather irritating. > > Is there maybe a better place to ask this question? > > > > Thanks, > > Michael > > I would hope that it would fail safe if the variable is not set... > > This is as good a place to ask the question as any. The other place is > [email protected] if you have a simple test case that shows the bug > possibly using :fork: as the method rather than :pserver: as > the former > is a bit easier to debug... Ok, here it is. Just use a local repository. If the user variable is not set the checkin proceeds without calling the verifymsg script verifymsg.sh. $ cat verifymsg ^test $CVSROOT/CVSROOT/verifymsg.sh ${=CvsUser} DEFAULT echo DEFAULT clause... $ cat verifymsg.sh #!/bin/sh echo "\$1: $1 \$2: $2 \$3: $3" exit 0 $ cvs -d /inaetc/bfsaparc/cvs/repos/ co test cvs checkout: Updating test U test/cold.oeb U test/cold.oec U test/cold.oel U test/cold1.oel cvs checkout: Updating test/bla U test/bla/cold.oel $ cd test/ $ echo // bla bla >> cold.oel $ cvs ci -m 'This will not call verifymsg.' cvs commit: Examining . cvs commit: Examining bla cvs commit: verifymsg:1: no such user variable ${=CvsUser} Checking in cold.oel; /inaetc/bfsaparc/cvs/repos/test/cold.oel,v <-- cold.oel new revision: 1.37; previous revision: 1.36 done So the checkin proceeds without calling verifymsg.sh. It also doesn't call the DEFAULT clause. This prevents me to check from the script if the variable is set and react accordingly. Here the proof the stuff works with the variable defined: $ echo // bla bla >> cold.oel $ cvs -s CvsUser=otto ci -m 'This does call verifymsg.' cvs commit: Examining . cvs commit: Examining bla $1: otto $2: /tmp/cvsxxaaZu $3: Checking in cold.oel; /inaetc/bfsaparc/cvs/repos/test/cold.oel,v <-- cold.oel new revision: 1.38; previous revision: 1.37 done Same behavior if I called it remotely with :ext:. Thanks, Michael