C-hglib - Level 0, API proposal.
idankk86 at gmail.com
Tue Jul 9 07:56:31 CDT 2013
On Mon, Jul 8, 2013 at 10:27 PM, Iulian Stana <julian.stana at gmail.com>wrote:
> >> 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
>> > 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:
> 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 the defined
> function from
> 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.
It sounds fine as a first step, anything fancier is definitely not "level
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mercurial-devel