El 28/08/2009 04:28 p.m., Greg Ward escribió:
>
> On Fri, Aug 28, 2009 at 5:12 PM, Bastian Doetsch<[email protected]>
> wrote:
>>> 2) failure to load one extension does not mean Mercurial is broken;
>>> IMHO it would be safe to ignore the "*** failed to import extension
>>> ..." message and parse the rest of Mercurial's output
>>
>> So how should we know what is okay and what not. Maintaining a list of
>> extensions that are known or okay to fail doesn't seem desirable to me.
>
> No, that would be crazy. But I'm pretty sure it's safe to ignore "**
> failed to import extension" by default. Core Mercurial behaviour does
> not depend on extensions, and I hope that core MercurialEclipse
> behaviour does not either.
I hope so, too :). Yeah, one could specifically do it, but I guess what
kicks in is the generic error code handling - probably mercurial doesn't
return 0 as error code, so we react to it. There are some exceptions
when we don't care and pass a parameter to ignore error codes, but we
shouldn't do it for all commands. Error codes is a problem in Mercurial
because it's not documented and there are no real standards apart from 0
= success.
>
> I notice that you have some interfaces to mq, rebase, transplant, and
> a few others. So you might have to apply a little extra intelligence
> when reading that "failed to import" line. That means you'd need a
> list of extensions that have to work: e.g. mq, rebase, transplant.
> But if any other extension fails to load... ignore it.
See above, unfortunately it's not that easy...
>
>>> 3) no indication of how to reproduce the problem; I had to dig into
>>> the source code for MercurialEclipse to figure out what it was doing
>>> and understand the problem. It would be nice to know 1) what
>>> environment vars are set, 2) what command was run, and 3) what
>>> directory it was run from.
>>
>> The MercurialEclipse console shows the commands. You just need to open
>> it to see it.
>
> Great! How do I open the MercurialEclipse console? I looked in
> Window->Open Perspective, Window->Show View->Other->{Mercurial,Team}
> and found nothing. I didn't see anything under the project "Team"
> Menu either.
Show View->Console. In Console view you can add consoles from all
plugins that provide consoles.
>
>> One could output all the debug information when debug
>> information is enabled in the preferences, right now, only the complete
>> Mercurial output is shown in addition to the command issued.
>
> That reminds me: I saw "debug mode" in the code, but I couldn't figure
> out how to turn it on. What's the secret?
It's a preference in the MercurialEclipse console preferences. But
especially with log and status it outputs tons of data.
>
>>> I found a workaround for the crecord bug: just set LANG=C rather than
>>> "en". At least that works on my Linux box. But IMHO the real bug us
>>> #2 above; just because some extension is broken does not mean that
>>> Mercurial is broken. I would submit a patch, but I can't find where
>>> in the code that error is generated. Hints?
>>
>> MercurialEclipse uses the project resp. the platform encoding specified
>> in your project settings. Setting LANG=C generally doesn't work because
>> of other locales as mentioned above.
>
> But you've already hardcoded LANG=en when running hg. (See my patch:
> http://bitbucket.org/gward/main/changeset/288cec4faa83/.) How can
> LANG=C be any worse than LANG=en? At least "C" is a special locale
> rather than arbitrarily chosen language.
Oh yeah, you got me there. We set the language, but use hgencoding to
parse / encode the data that goes to Mercurial. Dunno though, if setting
LANG=C works on Mac or Windows, "en" works for sure. But it is not
arbitrarily chosen, it is just the language that works without
localizations. But if "C" works on Macs and Windows as well, I don't see
any problems pulling your patch.
Bastian
>
> Greg
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"MercurialEclipse" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/mercurialeclipse?hl=en
-~----------~----~----~----~------~----~------~--~---