C-hglib - Level 0, API proposal.

Iulian Stana julian.stana at gmail.com
Mon Jul 8 14:27:22 CDT 2013

    >> b) hg log <- can produce huge output

> >> I know that some repo could have a huge log,
> >> but I don't know if the user will use that huge output.
> >> My single thought right now is to set a limit for the huge mass of data.
> >
> > Err... No way.
> >
> > Please work harder on this. Discarding output from `hg log`
> > is simply not acceptable. We can do (much) better.

Hmm, like I said, it was my first thought. I would like to get some suggest
for this
particular issue. Maybe some hits, where I can go and dig.

> I think you should look at how python-hglib and JavaHg does this. They
> both use a callback function that the programmer who uses the library
> must supply. The callback function should answer the prompts.
I believe the python-hglib tries to do something similar, but that it
> doesn't yet track the merge state in a dedicated object. The handlers in
> python-hglib are here:
>   http://selenic.com/repo/python-hglib/file/c13b99b01008/hglib/merge.py
>From what I understand python-hglib, makes exactly what you said. There is
a callback function that handle the prompts.
The merge command gets an argument called cb (with can be a callback
By default the cb argument is merge.handlers.abort[1] the defined function
merge.py file.

> A merge prompt is "Dear user, I have found some conflicts while
> > merging this two files. I would really appreciate your help in solving
> > them."
> > Replying "F*ck you" to such a gentle request from mercurial
> > would be very unpolite. We are a bunch of nice guys.

What I suggest here is exactly what python-hglib makes. There will be a
to set that callback function.
I know that this thing can be a very rough, but a return code that will
suggest that
the merge failed can be enough.


O zi buna,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20130708/5f368319/attachment.html>

More information about the Mercurial-devel mailing list