The mercurial commands for C-hglib

Brendan Cully brendan at
Thu Jun 27 14:47:37 CDT 2013

On Thursday, 27 June 2013 at 22:43, Iulian Stana wrote:
> The mercurial commands for C-hglib:
> In the last two days, I've tried to come with a good approach for the
> signatures of API functions. The biggest problem I found it was on the
> mercurial commands. The number of options for a specific command can be
> variable.
> Here are some of the options that I have found. With pro and contra
> arguments and some examples of usage.
> {
>    // Create a client
>    chgclient *chg = chgopen();
>    {
>    //magic happens, here the commands are called
>    }
>    // Close the client
>    chgclose(chg);
> }

Drive-by comment: I think the API prefixes are better as 'hg' than
'chg'. Since you're in C when you use this API, chg is redundant, and
chg is harder to read IMHO.

More information about the Mercurial-devel mailing list