<div dir="ltr">    >> b) hg log <- can produce huge output<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div><div>
>> I know that some repo could have a huge log,<br>
>> but I don't know if the user will use that huge output.<br>
>> My single thought right now is to set a limit for the huge mass of data.<br>
><br>
> Err... No way.<br>
><br>
> Please work harder on this. Discarding output from `hg log`<br>
> is simply not acceptable. We can do (much) better.<br></div></div></blockquote><div><br></div><div>Hmm, like I said, it was my first thought. I would like to get some suggest for this</div><div>particular issue. Maybe some hits, where I can go and dig.</div>
<div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div>
</div></div>I think you should look at how python-hglib and JavaHg does this. They<br>
both use a callback function that the programmer who uses the library<br>
must supply. The callback function should answer the prompts.<br> <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

I believe the python-hglib tries to do something similar, but that it<br>
doesn't yet track the merge state in a dedicated object. The handlers in<br>
python-hglib are here:<br>
<br>
  <a href="http://selenic.com/repo/python-hglib/file/c13b99b01008/hglib/merge.py" target="_blank">http://selenic.com/repo/python-hglib/file/c13b99b01008/hglib/merge.py</a><br>
<span><font color="#888888"><br></font></span></blockquote><div> </div><div>From what I understand python-hglib, makes exactly what you said. There is</div><div>a callback function that handle the prompts. </div><div>The merge command gets an argument called cb (with can be a callback function).</div>
<div>By default the cb argument is <span style="background-color:rgb(240,240,240);color:rgb(0,0,0);font-family:monospace;font-size:12px;white-space:pre">merge.handlers.abort</span>[1] the defined function from </div><div>
merge.py file.</div><div><br></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">> A merge prompt is "Dear user, I have found some conflicts while<br>
> merging this two files. I would really appreciate your help in solving<br>> them."<br>> Replying "F*ck you" to such a gentle request from mercurial<br>> would be very unpolite. We are a bunch of nice guys.</blockquote>
</div><div><br></div><div>What I suggest here is exactly what python-hglib makes. There will be a possibly </div><div>to set that callback function.</div><div>I know that this thing can be a very rough, but a return code that will suggest that</div>
<div>the merge failed can be enough.</div><div><br></div><div><br></div><div>[1]: <a href="http://selenic.com/repo/python-hglib/file/661f78f395ea/hglib/client.py#l1007">http://selenic.com/repo/python-hglib/file/661f78f395ea/hglib/client.py#l1007</a></div>
</div><div><br></div>-- <br><div dir="ltr">O zi buna,<div>Iulian</div></div>
</div></div>