<div dir="ltr">On Mon, Jul 8, 2013 at 10:27 PM, Iulian Stana <span dir="ltr"><<a href="mailto:julian.stana@gmail.com" target="_blank">julian.stana@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div class="im">    >> b) hg log <- can produce huge output<br></div><div class="gmail_extra"><div class="gmail_quote"><div class="im"><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><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 class="im">
<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></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">


I believe the python-hglib tries to do something similar, but that it<div class="im"><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></div></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="font-size:12px;white-space:pre-wrap;background-color:rgb(240,240,240);font-family:monospace">merge.handlers.abort</span>[1] the defined function from </div><div>
merge.py file.</div><div class="im"><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><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></div></div></blockquote><div> </div><div>It sounds fine as a first step, anything fancier is definitely not "level 0".</div></div></div>