# HG changeset patch # User Sean Farley # Date 2013-11-25 17:20:39 # Node ID 8f4a226c840c38b905c5cba2596d8ffe3cd27bca # Parent 2af9e1d40dc7c9306e9e2369701cafd33e99f5af dispatch: turn off custom debugger for HGPLAIN mode Some debuggers, such as ipdb, load escape codes and color codes even when later turned off. This will affect scripts that do simple parsing and can't handle escape codes. Therefore, we only load a custom debugger if ui.plain() is false. diff --git a/mercurial/dispatch.py b/mercurial/dispatch.py --- a/mercurial/dispatch.py +++ b/mercurial/dispatch.py @@ -106,8 +106,9 @@ def _runcatch(req): for cfg in cfgs: req.repo.ui.setconfig(*cfg) + # if we are in HGPLAIN mode, then disable custom debugging debugger = ui.config("ui", "debugger") - if not debugger: + if not debugger or ui.plain(): debugger = 'pdb' try: