Right, I didn't think about the affect to the command line till I used it. I
think the "-z tag" type of solution would be the best. For right now it could
just tag the newline to any Fossil command that needs user input letting your
solution work. Later we could discuss a better automation input. This would
allow a simple way to talk to Fossil without the need for a whole API. It
would
seem to me this would be a reasonable patch.
Feature request: new switch "-z" (example) as part of the command line to
indicate parsable output. I don't remember what switches Fossil takes as
inputs. I just use Fossil for my Android app repositories so I am not a power
Fossil user, by any stretch of the imagination. For right now it would add a
newline at the end of every output "line".
Tim
________________________________
Re: [fossil-users] SharpFossil/WinFossil
Ingo Koch
Tue, 10 May 2011 14:02:22 -0700
Am 10.05.2011 02:24, schrieb Jeff Slutter: > On 5/9/2011 8:15 PM, Matt Welland
wrote: >> Rather than changing the terminal user interface (it will be slightly
>> less nice IMHO due to the extra newline on a prompt) I suggest >>
>> considering
the approach used on the monotone project. A separate >> interface for
automation. Make the human friendly interface friendly >> to humans and make
the
automation interface friendly to automation. > I agree, you don't want to mess
up the text for the normal command line > user. I suggest doing something
similar to Perforce with it's tagged > text output ("-z tag") ripe for parsing,
or, just testing to see if > adding fflush(stdout); fflush(stderr); instead of
adding tacking on a > newline. This will hopefully cause the parent process to
receive the > child output. Unfortunately fflush(stdout) doesn't help. It is
part of the prompt_user function since day one. For now, I think I'll do it
with
my small change. It works and has near to no impact on the fossil code base.
The
prompt_user function doesn't look like it will be changed in the future. An
additional flag for parsing friendly output would require changes in a number
of
commands and IMHO is not an option until there are more projects which require
this. Ingo
------------------------------
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users
End of fossil-users Digest, Vol 40, Issue 14
********************************************
_______________________________________________
fossil-users mailing list
[email protected]
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users