[PATCH 0 of 1] debugcommands.py

Peter Arrenbrecht peter.arrenbrecht at gmail.com
Wed May 11 00:22:32 CDT 2011


On Tue, May 10, 2011 at 10:28 PM, Matt Mackall <mpm at selenic.com> wrote:
> On Tue, 2011-05-10 at 21:42 +0200, Benoit Boissinot wrote:
>> On Tue, May 10, 2011 at 5:37 PM, Adrian Buehlmann <adrian at cadifra.com> wrote:
>> > I played a bit with how it could look like if we at least moved the debug commands
>> > out of commands.py into a new debugcommands.py.
>> >
>> > Not sure it's really worth doing. I'm not expecting this to make things faster
>> > (at least not intentionally).
>> >
>> > It cuts commands.py down a bit though (from almost 5000 lines to ~4200).
>> >
>> > In case your're interested in including such a patch, I would need to merge
>> > it first with tip, since it's not synced to the latest churn in commands.py.
>>
>> I'm +1 on that. You'd need to also update the comment on the top of
>> the files (after the imports), to point to the location of the debug
>> commands.
>
> I'm mostly indifferent about moving the debug commands as a group, and
> not really excited about other splits.
>
> Thing is, I've really never had any trouble with the size of this file.
> Each function is alphabetized, easy to grep for, well contained, and
> when I'm doing bulk changes, it's convenient to have everything in one
> place. And I never need to ask myself "how the hell does this module
> work?" which I often have to do with much smaller modules like, say,
> dispatch.py. This file is just not a problem organizationally.
>
> One of the few things I would consider changing here is the commands
> table. Ideally the command table entries would somehow be stored right
> next to the command definition.

This would help a lot!
-parren


More information about the Mercurial-devel mailing list