[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: can't we use "svnrdump load" in interactive mode?

From: Peter Samuelson <peter_at_p12n.org>
Date: Fri, 3 Jun 2011 12:13:25 -0500

[Stefan Sperling]
> svnrdump should not be using stdin for input.
> It should accept the file on the command line instead because
> using stdin interferes with prompting.

Hrrrmph. I think libsvn_subr/prompt.c could use a large dose of
"/dev/tty". Right now it mostly uses stderr and stdin, but for
password prompts it uses /dev/tty on modern Unix ... indirectly,
by calling apr_password_get() which calls getpass(), an OS library
function.

"/dev/tty" is mentioned in APUE from 1992, so I expect it is pretty
universal in Unix-land, but one could also use ctermid() if available.
On Win32, I understand the console is named "CON:". Are there any
other platforms we support where /dev/tty, CON: and ctermid() would all
fail? Unfortunately, apr doesn't provide any of this stuff.

I'd also like to assume --non-interactive if our process has no
controlling terminal. On Unix you can tell by trying to open /dev/tty.
On Windows, maybe similar? Anyway, auto-detection of --non-interactive
would be nice but is really kinda a separate discussion.

-- 
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
Received on 2011-06-03 19:14:07 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.