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

Matt Mackall mpm at selenic.com
Thu Jul 16 12:35:59 CDT 2015


# HG changeset patch
# User Matt Mackall <mpm at 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.

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
 


More information about the Mercurial-devel mailing list