Larry Jones wrote:
> 
> Mike McKay Jr. writes:
> >
> > I have scripts specified from CVSROOT/editinfo that require user input
> > during a commit (the perl script does something like "$answer =
> > <STDIN>").  These scripts work fine using local CVS.  However, when I
> > use remote CVS (using ssh), the scripts do not prompt the user for
> > info.
> 
> http://www.cvshome.org/docs/manual/cvs_18.html#SEC167:
> 
>         Note: when CVS is accessing a remote repository, or when the
>         `-m' or `-F' options to cvs commit are used, `editinfo' will not
>         be consulted. There is no good workaround for this; use
>         `verifymsg' instead.
> 
> Unfortunately, the advice given in the last line isn't really applicable
> here because verifymsg runs on the server so you still can't interact
> with the user.  What exactly are you trying to do?
> 
> -Larry Jones
> 
> This sounds suspiciously like one of Dad's plots to build my character.
> -- Calvin

Hey,

Ahhh - not finding editinfo for remote commits might blow me out of the
water...so I might not be able to do remote commits anyway.  I need editinfo
because I dynamically generate a template that is unique per commit.  I cannot
use a standard template (rcsinfo) for every commit.  However, in case you do
have a solution/suggestion for the "user input" problem, I will try and explain
it better.

While examining a remote commit more closely, I see the problem first occurs
with the execution of a script inside commitinfo:

CVSROOT/commitinfo:
        DEFAULT $CVSROOT/../Script/precommit.pl

In the perl script precommit.pl, I do the following:
        1) check to see if the logname of the user is in our list of valid commiters
        2) prompt the user to enter the email address of their peer reviewer.
           This data (and some additional data automatically obtained) is saved to
           a file that is later used by a CVSROOT/editinfo script to generate
           a dynamic log message template.

When doing a remote commit (using CVS_RSH=ssh), the prompting does not get user
input but just sends a null value to the perl script.  In order to get ssh to
run a perl script that takes user input, I need to use "ssh -t".  With a bit of
trickery, I am able to do this, but I get the following error message when doing
a "cvs commit" (the error message is from ssh):
        Pseudo-terminal will not be allocated because stdin is not a terminal.

Again, as I cannot use CVSROOT/editinfo for remote commits...the above problem
might be moot.

Thanks for your help,

--Mike

---------------------
Mike McKay
[EMAIL PROTECTED]
505-665-2714
---------------------

_______________________________________________
Info-cvs mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/info-cvs

Reply via email to