bug-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: verifymsg not called if user variable undefined


From: Lemke, Michael IZ/HZA-IC1
Subject: RE: verifymsg not called if user variable undefined
Date: Tue, 20 May 2003 19:11:22 +0200

> -----Original Message-----
> From: Lemke, Michael IZ/HZA-IC1 
> Sent: Tuesday, May 20, 2003 3:45 PM
> 
> 
> > 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
> > address@hidden 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:.
> 

Another data point:

commitinfo behaves slightly differently.  It doesn't call its
script either but the commit aborts:

$ cvs ci -m '...'
cvs commit: Examining .
cvs commit: Examining bla
cvs server: commitinfo:16: no such user variable ${=CvsUser}
cvs server: Pre-commit check failed
cvs [server aborted]: correct above errors first!
$

Slightly better but I still can't provide a proper error message.

Michael




reply via email to

[Prev in Thread] Current Thread [Next in Thread]