[PATCH 0 of 1 hglib POC] hglib: a Python wrapper around hg's cmdserver

Idan Kamara idankk86 at gmail.com
Mon Jul 4 06:17:57 CDT 2011


On Mon, Jul 4, 2011 at 1:46 PM, Martin Geisler <mg at aragost.com> wrote:
>
> Idan Kamara <idankk86 at gmail.com> writes:
>
> > - hgclient.commit() is hacky: it uses hgclient.tip() to return the
> > committed revision. afaik there's no way to get 'hg commit' to output
> > the just committed node id, maybe it needs a new option? (import is
> > also problematic)
>
> Use 'hg commit --debug' to make it print the changeset hash.

Nice, didn't know that. But do we have the usual API guarantees on the
various commands output when using --debug?

>
> > - I discovered it's impossible to use '\0' (e.g. in --template), due
> > to it being used as the args delimiter in the command protocol
> > runcommand. Style files saved the day here, but this is still a
> > limitation of the protocol.
>
> You don't need to send a NUL byte directly, backslash-zero works too
> since Mercurial will string-decode the template.

Oh, was sure I tried that, thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20110704/09f9e65f/attachment.htm>


More information about the Mercurial-devel mailing list