changeset 20122:8f4a226c840c

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.
author Sean Farley <sean.michael.farley@gmail.com>
date Mon, 25 Nov 2013 12:20:39 -0500
parents 2af9e1d40dc7
children f16240c8e959
files mercurial/dispatch.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/dispatch.py	Sun Nov 17 12:18:26 2013 +0100
+++ b/mercurial/dispatch.py	Mon Nov 25 12:20:39 2013 -0500
@@ -106,8 +106,9 @@
                 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: