<div dir="ltr"><div class="gmail_quote">On Thu, Jan 12, 2012 at 2:38 AM, Jordi Gutiérrez Hermoso <span dir="ltr"><<a href="mailto:jordigh@octave.org">jordigh@octave.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
2012/1/11 Idan Kamara <<a href="mailto:idankk86@gmail.com">idankk86@gmail.com</a>>:<br>
<div class="im">> On Wed, Jan 11, 2012 at 11:00 PM, Jordi Gutiérrez Hermoso<br>
> <<a href="mailto:jordigh@octave.org">jordigh@octave.org</a>> wrote:<br>
>><br>
>> # HG changeset patch<br>
>> # User Jordi Gutiérrez Hermoso <<a href="mailto:jordigh@octave.org">jordigh@octave.org</a>><br>
>> # Date 1326315222 18000<br>
>> # Node ID 9fe70ec6cb418daa14fed5f09f94c4f482d4d052<br>
>> # Parent  c47d69ce5208d5b5cfd2fb2f0f1d7a2b4795fbf5<br>
>> merge: report all files in _checkunknown<br>
><br>
><br>
> Some suggestions below (without really digging how to kill this function<br>
> like Matt said).<br>
><br>
>><br>
>><br>
>> When doing hg up, if there is a file conflict with untracked files,<br>
>> currently only the first such conflict is reported. With this patch,<br>
>> all of them are listed.<br>
>><br>
>> Since this requires a list, makes sense to put this list as another<br>
>> kwarg to the Abort exception. The hint kwarg is the wrong place for<br>
>> it, since it doesn't get displayed correctly for this purpose. I<br>
>> displayed this list along with the error in the relevant locations in<br>
>> dispatch.py<br>
><br>
><br>
> Why not just do the formatting at _checkunknown? It's less intrusive<br>
> than adding an error list to util.Abort, which doesn't sound too useful.<br>
<br>
</div>I don't know. I thought it was uncharacteristic of the hg code to<br>
terminate abruptly instead of raising exceptions.<br></blockquote><div><br></div><div>I meant instead of passing a list of errors to util.Abort, call</div><div>'\n'.join(..) and pass the fully formatted error string when raising util.Abort.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
>><br>
>><br>
>> With this patch error message is now reported as<br>
>><br>
>>    abort: untracked file(s) in working directory differ from file(s)<br>
>>    in requested revision:<br>
>>      a<br>
>>      b<br>
>><br>
>><br>
>> instead of<br>
>><br>
>>    abort: untracked file in working directory differs from file in<br>
>>    requested revision: 'a'<br>
><br>
><br>
> What about:<br>
><br>
> abort: untracked file in working directory differs from file in<br>
>    requested revision: 'a', 'b', 'c'<br>
><br>
> It might be more consistent with the rest of the abort messages.<br>
<br>
</div>Well, consider the case of hundreds of files. Having them all display<br>
on the same line would provide very ugly output.<br></blockquote><div><br></div><div>Yeah, then maybe the place for this summary isn't in an error message,</div><div>maybe with -v.</div><div><br></div><div>A hint to hg status -u would have been better, but that might show untracked</div>
<div>files that aren't getting in the way.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
- Jordi G. H.<br>
</blockquote></div><br></div>