[PATCH v2] dispatch: refactor tortured debugger setup logic
Sean Farley
sean at farley.io
Fri Jan 1 16:58:44 CST 2016
Bryan O'Sullivan <bos at serpentine.com> writes:
> # HG changeset patch
> # User Bryan O'Sullivan <bos at serpentine.com>
> # Date 1451688323 28800
> # Fri Jan 01 14:45:23 2016 -0800
> # Node ID f019056c88a34d9cf9d01e10f1354e049ce07521
> # Parent 44f717c879033f28d3f7e7dc9f34aa394d2fea3f
> dispatch: refactor tortured debugger setup logic
>
> This patch was triggered by observing that the pdb debugger was
> always loaded regardless of whether a debugger was to be used.
>
> The logic as it existed was a thicket of accidental complexity.
> It's now much easier to follow (and only loads a debugger if needed).
Long ago, when I wrote some of this code, I wanted the ability to throw
in a:
import ipdb
ipdb.set_trace()
And have that throw me into a debugger. My reasoning was that I didn't
always control the command-line args (such as some test scripts
running).
Anyway, it that seems broken nowadays because of the absolute import
stuff from Greg, so I don't know if what I was trying to achieve is even
worth it now.
More information about the Mercurial-devel
mailing list