Peter Davis firstname.lastname@example.org writes:
Fix Issue 1117. This is a simple fix: display all prompt callbacks to
stderr. Currently, apr_password_get() displays its prompts to stderr, but
Subversion's own prompt code simply printf's to stdout. This change puts
both prompts to the same stream.
Actually, apr_password_get() doesn't display its prompts to stderr
except when unavoidable. It tries to use the system's getpassphrase()
or getpass() function. Here is how (for example) Solaris 2.6
The getpass() function opens the process' controlling terminal,
writes to that device the null-terminated string prompt, disables
echoing, reads a string of characters up to the next newline
character or EOF, restores the terminal state and closes the
The function getpassphrase() is identical to getpass(), except that
it will read and return a string of up to 256 characters in length.
See my comments in issue #1117. Short summary: we can probably apply
the use-stderr patch right away, because it's an improvement over the
existing situation, but the right fix would be a portable function in
APR to do what getpass()/getpassphrase() do. However, hmmm, it looks
like APR does use stderr when no system getpass()/getpassphrase() is
available -- that is, APR doesn't have any prompt-hiding code of its
own. So the Right Solution might be harder than I thought, oh well.
On to the patch:
* clients/cmdline/prompt.c (svn_cl__prompt_user):
Send prompts to stderr instead of stdout.
--- subversion/clients/cmdline/prompt.c (revision 4632)
+++ subversion/clients/cmdline/prompt.c (working copy)
@@ -103,8 +103,8 @@
if (! hide)
+ fprintf (stderr, prompt_native);
+ fflush (stderr);
Um, are you sure about this? :-) I mean, I can apply it with the
obvious transformation, but shouldn't there also be two removed lines
in this patch, as well as two added lines?
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org
Received on Sat Oct 14 02:22:10 2006