Patchwork [3,of,6] mq: tweak config reading to make check-config happy

login
register
mail settings
Submitter Matt Mackall
Date July 16, 2015, 5:35 p.m.
Message ID <367d68d954c43db19c31.1437068159@ruin.waste.org>
Download mbox | patch
Permalink /patch/10015/
State Accepted
Commit 0fdf2c3040191bbc17ffd9037854df7fa0cd8b26
Headers show

Comments

Matt Mackall - July 16, 2015, 5:35 p.m.
# HG changeset patch
# User Matt Mackall <mpm@selenic.com>
# Date 1435272100 18000
#      Thu Jun 25 17:41:40 2015 -0500
# Node ID 367d68d954c43db19c314121f6451bbd2b91bd53
# Parent  854086eeb8f76a7c85ebe2f6d266bde152abe9c3
mq: tweak config reading to make check-config happy

The not-really-a-bool handling here upsets the type checker.

Patch

diff -r 854086eeb8f7 -r 367d68d954c4 hgext/mq.py
--- a/hgext/mq.py	Thu Jun 25 17:38:14 2015 -0500
+++ b/hgext/mq.py	Thu Jun 25 17:41:40 2015 -0500
@@ -430,7 +430,9 @@ 
             else:
                 self.gitmode = 'no'
         except error.ConfigError:
-            self.gitmode = ui.config('mq', 'git', 'auto').lower()
+            # let's have check-config ignore the type mismatch
+            self.gitmode = ui.config(r'mq', 'git', 'auto').lower()
+        # deprecated config: mq.plain
         self.plainmode = ui.configbool('mq', 'plain', False)
         self.checkapplied = True