With moving more commands into automate we'll need improvements to automate stdio, firstly so that restrictions are usable, and secondly to allow for an input stream (this will be useful if we decide that, say, a 'merge' variant should be available through automate). It would also be nice to allow for other optional arguments, such as 'author' and 'date' for commit.
The input format is currently 'l' <string> [<string> [...]] 'e' with <string> = <num> ':' <data> , providing only a command name and positional arguments. For restrictions and other optional arguments, I'd like to have another list of strings as above, but with a different initial letter (say, 'o'), and with always an even number of strings ordered as "option, value [, option, value [...]]". An input stream could be provided with the same mechanism, with the strings being concatentated to provide the stream data. This would need another initial letter, say 'i'. Reading the stream would not return EOF until the closing 'e' of the series of strings had been given, or an opening 'o' or 'l' for the next command had been given (in which case there would be no input). The options would precede the command, and the input would follow it. Having the input be after the command allows for it to be interactive, as providing the input can be interleaved with reading the output. (I mostly see interactivity being useful for merging, as files can be requsted for conflict resolution in any desired order instead of being stuck with some arbitrary order that monotone chooses.) The input format would now be: [ 'o' <string> <string> [<string> <string> [...]] 'e' ] 'l' <string> [<string> [...]] 'e' [ 'i' <string> [<string> [...]] 'e' ] [...] again, with <string> = <num> ':' <data> I'm thinking that landing nvm.experiment.boost-program-options would make the options part easier; what's the status of that branch? -- Free public monotone hosting: http://mtn-host.prjek.net _______________________________________________ Monotone-devel mailing list Monotone-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/monotone-devel