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 Samuelson <pe...@p12n.org> on 2009/04/03 13:55:11 UTC
Re: [GSOC]Show progress output
[Yes, I know this thread is a week old.]
[John Peacock]
> I suppose we could try to have it default to ON if the process has a
> tty and OFF otherwise (which should deal with scripting), but knowing
> how the Subversion client libraries are designed, that information
> may be two or more call sites removed from where you'd want to know.
We already have precedent for breaking scripts. Remember when you
could do a simple 'svn update' in a post-commit hook? Now it will get
you in trouble, because by default it does interactive conflict
resolution. The solution is '--non-interactive'. And in fact we
encourage people to always use '--non-interactive' in scripts, even for
subcommands that are already noninteractive, because you never know
which subcommands may _become_ interactive in future releases.
That said, I would favor moving all of our interactivity to use
/dev/tty instead of stdin/stdout, and treat failure to open /dev/tty as
if --non-interactive had been passed. (And, well, I have no idea what
the Windows equivalent would be.)
--
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
Re: [GSOC]Show progress output
Posted by Peter Samuelson <pe...@p12n.org>.
[Eric Gillespie]
> If svn ever prompts when standard input is not a tty, that is
> a bug.
Oh, I don't know - I think in general the more interesting question is
whether or not /dev/tty can be opened. I mean what if I do something
like:
find . -name '*.pdf' | xargs svn update
This pipeline might seem odd, but I think it's reasonable, and I think
it would be reasonable to prompt me over /dev/tty (note that stdin is
not available since svn is in a pipeline).
--
Peter Samuelson | org-tld!p12n!peter | http://p12n.org/
Re: [GSOC]Show progress output
Posted by Eric Gillespie <ep...@pretzelnet.org>.
Peter Samuelson <pe...@p12n.org> writes:
> We already have precedent for breaking scripts. Remember when you
> could do a simple 'svn update' in a post-commit hook? Now it will get
> you in trouble, because by default it does interactive conflict
If svn ever prompts when standard input is not a tty, that is
a bug.
--
Eric Gillespie <*> epg@pretzelnet.org
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=1535485