You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Hudson <gh...@MIT.EDU> on 2002/03/12 05:04:23 UTC

Re: svn commit: rev 1485 - trunk/subversion/libsvn_subr trunk/subversion/clients/cmdline trunk/subversion/clients/cmdline/man

On Mon, 2002-03-11 at 14:47, bcollins@tigris.org wrote:
> +  /* If user passed '-', use stdin. We could use apr_file_open_stdin here, and
> +   * in fact, it does work. Problem is that if the same command invokes the
> +   * editor, stdin is crap, and the editor acts funny (if not die outright). I
> +   * wanted to just disallow stdin reading and invoking the editor, but there's
> +   * no easy callback for that right now.  */

It would also probably be reasonable, on Unix, to reopen /dev/tty as
stdin (and maybe also as stdout and stderr) on the child in this case.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 1485 - trunk/subversion/libsvn_subr trunk/subversion/clients/cmdline trunk/subversion/clients/cmdline/man

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Mar 12, 2002 at 12:59:17AM -0500, Ben Collins wrote:
> On Tue, Mar 12, 2002 at 12:04:23AM -0500, Greg Hudson wrote:
> > On Mon, 2002-03-11 at 14:47, bcollins@tigris.org wrote:
> > > +  /* If user passed '-', use stdin. We could use apr_file_open_stdin here, and
> > > +   * in fact, it does work. Problem is that if the same command invokes the
> > > +   * editor, stdin is crap, and the editor acts funny (if not die outright). I
> > > +   * wanted to just disallow stdin reading and invoking the editor, but there's
> > > +   * no easy callback for that right now.  */
> > 
> > It would also probably be reasonable, on Unix, to reopen /dev/tty as
> > stdin (and maybe also as stdout and stderr) on the child in this case.
> 
> Yeah. Couldn't see a portable way to do this. Since I didn't see any
> other OS specific code, I didn't know what the consensus would be in
> this case.

Right. I'd say that if we're reading stdin for some targets, that we disable
the EDITOR functionality, which may (in turn) fail a commit-related action
unless --force is used.

For example, if they omit -F and -m, we normally go to pop up EDITOR to get
a message. If stdin is used, we disable that functionality. The result is
that a message isn't present, which is normally a failure. However, we allow
--force to get the commit to go in without a log message.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 1485 - trunk/subversion/libsvn_subr trunk/subversion/clients/cmdline trunk/subversion/clients/cmdline/man

Posted by Daniel Berlin <da...@dberlin.org>.
> > 
> > It would also probably be reasonable, on Unix, to reopen /dev/tty as
> > stdin (and maybe also as stdout and stderr) on the child in this case.
> 
> Yeah. Couldn't see a portable way to do this. Since I didn't see any
> other OS specific code, I didn't know what the consensus would be in
> this case.

I remember porting the "portable version" of OpenSSH to BeOS (back when I 
used it, anyway)
Almost all of the work (implementing the random device was the other hard 
work :P) was changing the calls to open/close ttys, and redirect them to 
places, in ways that were assumed to be portable, but were not.

Just a cautionary note.

--Dan 



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: svn commit: rev 1485 - trunk/subversion/libsvn_subr trunk/subversion/clients/cmdline trunk/subversion/clients/cmdline/man

Posted by Ben Collins <bc...@debian.org>.
On Tue, Mar 12, 2002 at 12:04:23AM -0500, Greg Hudson wrote:
> On Mon, 2002-03-11 at 14:47, bcollins@tigris.org wrote:
> > +  /* If user passed '-', use stdin. We could use apr_file_open_stdin here, and
> > +   * in fact, it does work. Problem is that if the same command invokes the
> > +   * editor, stdin is crap, and the editor acts funny (if not die outright). I
> > +   * wanted to just disallow stdin reading and invoking the editor, but there's
> > +   * no easy callback for that right now.  */
> 
> It would also probably be reasonable, on Unix, to reopen /dev/tty as
> stdin (and maybe also as stdout and stderr) on the child in this case.

Yeah. Couldn't see a portable way to do this. Since I didn't see any
other OS specific code, I didn't know what the consensus would be in
this case.

-- 
 .----------=======-=-======-=========-----------=====------------=-=-----.
/       Ben Collins    --    Debian GNU/Linux    --    WatchGuard.com      \
`          bcollins@debian.org   --   Ben.Collins@watchguard.com           '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org