C. Michael Pilato wrote:
> David Glasser wrote:
>> On 2/12/07, C. Michael Pilato <email@example.com> 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
>>> 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 <firstname.lastname@example.org>
CollabNet <> www.collab.net <> Distributed Development On Demand
Received on Sat Feb 17 20:35:39 2007