[PATCH] debug: move extensions debug behind a dedicated flag

Martin von Zweigbergk martinvonz at google.com
Mon Jul 16 13:14:08 EDT 2018


On Mon, Jul 16, 2018 at 10:07 AM Boris FELD <boris.feld at octobus.net> wrote:

> On 16/07/2018 18:48, Martin von Zweigbergk via Mercurial-devel wrote:
>
>
>
> On Mon, Jul 16, 2018, 09:24 Boris Feld <boris.feld at octobus.net> wrote:
>
>> # HG changeset patch
>> # User Boris Feld <boris.feld at octobus.net>
>> # Date 1531756950 -7200
>> #      Mon Jul 16 18:02:30 2018 +0200
>> # Node ID ae4c03e746f6837692762fe488991b64008efd3e
>> # Parent  3c569172848d329a81b1420d7cd8a5549b48f25f
>> # EXP-Topic extdebug
>> # Available At https://bitbucket.org/octobus/mercurial-devel/
>> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r
>> ae4c03e746f6
>> debug: move extensions debug behind a dedicated flag
>>
>> Since b86664c81833, we process the `--debug` flag earlier. This is overall
>> good and useful, but has at least one negative side effect.
>>
>> Previously the debug message we report when trying to import extensions
>> were
>> issued before we processed the `--debug` flag. Now they happen after.
>>
>> Before:
>>
>>   $ ./hg id --debug
>>   21f507b8de2f9c1606e9aeb5ec7d2a6dedb7a4a7 tip
>>
>> After:
>>
>>   $ ./hg id --debug                          ☿ (revset-bench)
>>   could not import hgext.evolve (No module named evolve): trying
>> hgext3rd.evolve
>>   could not import hgext.mercurial_keyring (No module named
>> mercurial_keyring): trying hgext3rd.mercurial_keyring
>>   could not import hgext3rd.mercurial_keyring (No module named
>> mercurial_keyring): trying mercurial_keyring
>>   could not import hgext.hggit (No module named hggit): trying
>> hgext3rd.hggit
>>   could not import hgext3rd.hggit (No module named hggit): trying hggit
>>   21f507b8de2f9c1606e9aeb5ec7d2a6dedb7a4a7 tip
>>
>
> Isn't it about time we add a --full-node option? The --debug flag has no
> backwards compatibility guarantee.
>
>
> The --full-node is covered by templating. So I don't think we use anything
> special regarding `hg id` here.
>
> The issue here is not about backward compatibility, but about usability.
> The extra debug lines are very verbose and gets in the ways (especially
> with traceback). I think they should be removed. `hg id` was only used an
> example of a simple command with a small output.
>

I see. I think `hg id --debug` is actually somewhat frequently (there are
at least 30 instances in our test cases), so I thought you wanted to
preserve that behavior.

I agree that the extension-loading debug printouts are a bit excessive, so
I don't mind hiding them behind a config option.


>
>
> Cheers,
>
> --
> Boris Feld
>
>
>
> _______________________________________________
> Mercurial-devel mailing listMercurial-devel at mercurial-scm.orghttps://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mercurial-scm.org/pipermail/mercurial-devel/attachments/20180716/7472215c/attachment.html>


More information about the Mercurial-devel mailing list