dispatch: turn off custom debugger for HGPLAIN mode
authorSean Farley <sean.michael.farley@gmail.com>
Mon, 25 Nov 2013 12:20:39 -0500
changeset 20122 8f4a226c840c
parent 20121 2af9e1d40dc7
child 20123 f16240c8e959
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.
mercurial/dispatch.py
--- 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: