[Top][All Lists]

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

Re: Remote CVS and CVSROOT/editinfo scripts requiring tty input

From: Michael D. McKay, Jr.
Subject: Re: Remote CVS and CVSROOT/editinfo scripts requiring tty input
Date: Wed, 24 Jan 2001 12:24:56 -0700

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.
>         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


Ahhh - not finding editinfo for remote commits might blow me out of the 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:

        DEFAULT $CVSROOT/../Script/

In the perl script, I do the following:
        1) check to see if the logname of the user is in our list of valid 
        2) prompt the user to enter the email address of their peer reviewer.
           This data (and some additional data automatically obtained) is saved 
           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 McKay

reply via email to

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