[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-17 20:35:21 CET

C. Michael Pilato wrote:
> 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.

Okay, well it seems to work fine now. Not sure what exactly I did wrong the
first time. Fixed MUCC to look for "-" instead of "STDIN" in r23427.

> 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.

Fixed this in r23426.

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

Received on Sat Feb 17 20:35:39 2007

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.