[darcs-devel] darcs robot command
Ben Coburn
btcoburn at silicodon.net
Thu Aug 2 03:35:50 PDT 2007
Some thinking out loud regarding command aliasing and driving darcs
with external code....
Instead of "tacking on" XML output to more commands, maybe it would
be better to have a command for driving darcs with bi-directional XML
messages.
For example, these two commands would be equivalent:
darcs changes -p test --xml-output
darcs robot changes -p test
Naturally there should be a "robot" subcommand for every main darcs
command.
For example, 'darcs robot record' might...
1) Send a blank "patch info" structure waiting to be filled in and a
big list of things available to record (where each thing has a record
property set to false).
2) Parse the returned XML structure for the patch name, comment, etc.
and record all the things that had their record property changed to
true.
Even without a harness driving darcs there are some clever things
that could be done by separating the phases described above...
darcs robot record | xsltproc fancy_record.xsl - | \
darcs robot record --no-output
(What '--no-output' means here is that step 1 of the above
description is skipped.)
In general, I think a "robot" command would be a good way to separate
automation related things from the human readable interface.
P.S. Should I file things like this through the "bug tracker"? It's
not exactly a feature request, just something I think people may want
to think about.
Regards, Ben Coburn
More information about the darcs-devel
mailing list