Sketch the header for level 1

Kevin Bullock kbullock+mercurial at ringworld.org
Sun Aug 4 16:11:17 CDT 2013


On 1 Aug 2013, at 6:18 AM, Iulian Stana wrote:

> Even if level 0 is not validated yet, I am exploring what level 1 might look like. Here are some sketches:
> 
> Start with some basic commands that everybody will use.
> (add, commit, push, pull, log, import/export, merge, verify)
> 
> add command:
> 1) int hg_add(hg_handle *handle, char *argv[], size_t argc);
> The return values for this function is the exitcode received from cmdserver for this command.
> You can still have data on cmdserver output channels (error/ output)
>     hg add “a wrong file” “a good file” --debug
> From the error data you will know each of those two files is the corrupt one.
> 
> 2) I think that the best solution for all those commands will be to return a structure of the following form:
> struct hg_ret{
>     int exitcode;
>     char *out_data;
>     char *err_data;
> };

Again, for things like `hg log`, you'll want to be able to read the output (and errors) long before you could possibly get the exit code.

I really think you need to nail down the full details of how level 0 will work before thinking about level 1.

pacem in terris / мир / शान्ति / ‎‫سَلاَم‬ / 平和
Kevin R. Bullock



More information about the Mercurial-devel mailing list