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

Re: svn commit: r23357 - trunk/contrib/client-side

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-02-16 19:36:06 CET

David Glasser wrote:
> On 2/12/07, C. Michael Pilato <cmpilato@collab.net> wrote:
>> David Glasser wrote:
>> > I think - is a more standard "use standard input instead of a file"
>> > argument. (Or /dev/fd/0 will just work on some platforms.)
>>
>> Oh, +1. But testing indicated that passing "-X -" confused the APR
>> getopt
>> code (which was expecting an option flag to follow that naked
>> hyphen). This
>> being a contrib script, I punted. Do we know how to trivially make this
>> work, though, because I'd really prefer to use the "-" convention?
>
> Hmm. In 'svn', the arg-parsing works at least (although
> svn_stringbuf_from_file still barfs):
>
> macbook:/tmp/x/w glasser$ echo adsdasfkjadfl | svn ps asdf -F - .
> svn: Reading from stdin is currently broken, so disabled

Hrm. Maybe my test case was horked. I'll give it another shot.

By the way, anybody else find it odd that it's svn_stringbuf_from_file()
that is complaining about reading from stdin in Dave's example? The
docstring sez:

 * ### Someday, "-" will fill @a *result from stdin. The problem right
 * now is that if the same command invokes the editor, stdin is crap,
 * and the editor acts funny or dies outright. One solution is to
 * disallow stdin reading and invoking the editor, but how to do that
 * reliably?

But that looks like a problem with a specific usage scenario that has
managed to find its way into what is supposed to be a generic API.

I'll try to fix that, too.

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Fri Feb 16 19:36:20 2007

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