You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Peter Davis <pe...@pdavis.cx> on 2002/12/22 06:56:31 UTC
Re: [Issue 1039] Changed - ra_dav / svn cat : adds a blank line at start of file
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Saturday 21 December 2002 17:54, issues@subversion.tigris.org wrote:
> + Here's the problem: programs traditionally echo the return after a
> + user enters a password at a prompt
>
> + I'm not sure there's a perfect solution to this. 'svn cat' and
> + password prompting just don't mix well.
I can't help but think that, barring line-buffer issues, the newline could
just be echoed to stderr instead of stdout (same for the password prompt).
After all, that is the purpose of stderr: a stream for messages that
shouldn't be redirected when redirecting the output into a file or pipe. Has
this already been discussed?
- --
Peter Davis
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (GNU/Linux)
iD8DBQE+BWIfhDAgUT1yirARAsn0AJ9w5uPmHhwGAMeBl7UgAMBQvpVDQQCggA7G
vAqM/YynqcnzsdoAN+uXMlc=
=5N6Y
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [Issue 1039] Changed - ra_dav / svn cat : adds a blank line at start of file
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:
> It's also common to use /dev/tty for password prompts, in case input has
> been redirected (ssh does it, for instance, which is why you can use ssh
> with password authentication as an ra_svn tunnel agent). Perhaps we
> should do that, and send the echoed newline there as well.
>
> (That's Unix-specific, of course.)
Turns out apr_getpass() already does this (my comments in the issue
were wrong). It looks like we introduced the spurious newline in very
old commits in subversion/clients/cmdline/trace-commit.c (revisions
1.7 and 1.8).
That's from CVS days, and trace-commit.c is gone now, but maybe that
newline lives on somewhere. Diagnosing now...
-Karl
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: [Issue 1039] Changed - ra_dav / svn cat : adds a blank line at
start of file
Posted by Greg Hudson <gh...@MIT.EDU>.
On Sun, 2002-12-22 at 01:56, Peter Davis wrote:
> I can't help but think that, barring line-buffer issues, the newline could
> just be echoed to stderr instead of stdout (same for the password prompt).
> After all, that is the purpose of stderr: a stream for messages that
> shouldn't be redirected when redirecting the output into a file or pipe. Has
> this already been discussed?
It's also common to use /dev/tty for password prompts, in case input has
been redirected (ssh does it, for instance, which is why you can use ssh
with password authentication as an ra_svn tunnel agent). Perhaps we
should do that, and send the echoed newline there as well.
(That's Unix-specific, of course.)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org