diff mercurial/ui.py @ 24883:09049042ab99 stable

ui: disable revsetaliases in plain mode (BC) ui.plain() is supposed to disable config options that change the UI to the detriment of scripts. As the test demonstrates, revset aliases can actually override builtin ones, just like command aliases. Therefore I believe this is a bugfix and appropriate for stable.
author Siddharth Agarwal <sid0@fb.com>
date Thu, 30 Apr 2015 07:46:54 -0700
parents 2f88821856eb
children bd625cd4e5e7
line wrap: on
line diff
--- a/mercurial/ui.py	Wed Apr 29 19:47:37 2015 +0900
+++ b/mercurial/ui.py	Thu Apr 30 07:46:54 2015 -0700
@@ -169,6 +169,9 @@
         if self.plain('alias'):
             for k, v in cfg.items('alias'):
                 del cfg['alias'][k]
+        if self.plain('revsetalias'):
+            for k, v in cfg.items('revsetalias'):
+                del cfg['revsetalias'][k]
 
         if trusted:
             self._tcfg.update(cfg)