[darcs-devel] [patch561] darcs now uses tty instead of stdin in promptChar

Ganesh Sittampalam ganesh at earth.li
Thu Feb 24 22:56:45 UTC 2011


On 24/02/2011 11:22, Eric Kow wrote:
> On Thu, Feb 24, 2011 at 08:42:36 +0000, Ganesh Sittampalam wrote:
>> I can't see how the tests could sensibly be rewritten. So we'd need a flag
>> to control this behaviour.
>
> Is it technically feasible to have some kind of command, let's call it
> fake-terminal, that runs a command, accepts input on stdin and pretends
> to that command that the input was typed in?
>
>    echo yn | fake-terminal darcs ...
>
> Is something like Expect what I'm thinking of?
>    http://en.wikipedia.org/wiki/Expect
>
> Could we "just use expect"? (That sounds like it'd involve a lot of
> exit 200) or cook up a really brain-dead version?
>
> (Perhaps I misunderstand the issue)


Ah, good point. We probably could do something like that.

But we'd also be breaking anyone trying to use the darcs binary 
programmatically in some way. If the only benefit is for apply 
--interactive, I think we shouldn't do that; providing a flag should 
work fine for that scenario.

Ganesh




More information about the darcs-devel mailing list