info-cvs
[Top][All Lists]
Advanced

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

Re: testing for running via psserve


From: Mark D. Baushke
Subject: Re: testing for running via psserve
Date: Tue, 20 May 2003 07:57:43 -0700

David A Uebele <address@hidden> writes:

> Mark D. Baushke said something close to this:
> > 
> > David A Uebele <address@hidden> writes:
> > 
> > > Any suggestions for a simply way to test if a cvs commit is
> > > going through pserver or via straight cvs commit on the local
> > > machine?
> > Why does this matter?
> 
> Because the perl script running before commit normally will
> prompt a user for defect tracking information. I have
> an alternative mechanism to avoid this prompting, and I found a bug
> in that system, where someone forgets to activate the alternate
> mechanism, the "trying to prompt the user for defect information"
> gets ugly. I'd like to early on do a test "this commit is coming in
> via pserver, and I don't have the information I need, issue 
> meaningful warning message and abort.

Ahhh... I suggest you may wish to move the check into the verifymsg script.
Rather than prompting the user on the tty, have the CVS/Template contain
some indication like

  BugID:

or whatever you think is a good indicator that folks should be using a
defect tracking number or problem report number.

Then, you may deny the commit based on this information being present or
not.

If there are some modules that do not need a BugID (possibly the CVSROOT
module), then you can rewrite the logmessage from the verifymsg trigger
so that it does not contain an empty BugID: line.
 
> > On the server side of the client/server connection, the CVSROOT looks
> > like a simple pathname to the files on the local filesystem.
> > 
> > The most likely distinction might be that you are passing the ${USER}
> > token on the commitinfo line. If you are mapping your usernames into
> > fewer pserver accounts, then comparing that value with the real
> > enviornment value of USER might help make the distinction you desire.
> 
> No, not changing the ${USER} token.
> 
> Perhaps some check to see if this is associated with a tty. I recall
> doing that in the past.

You may have problems if folks are using :ext: and you intermix stuff on
the tty of the ${CVS_RSH} shell.

        Good luck,
        -- Mark





reply via email to

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