Mercurial > public > mercurial-scm > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
24882:995003a324da | 24883:09049042ab99 |
---|---|
167 del cfg['defaults'][k] | 167 del cfg['defaults'][k] |
168 # Don't remove aliases from the configuration if in the exceptionlist | 168 # Don't remove aliases from the configuration if in the exceptionlist |
169 if self.plain('alias'): | 169 if self.plain('alias'): |
170 for k, v in cfg.items('alias'): | 170 for k, v in cfg.items('alias'): |
171 del cfg['alias'][k] | 171 del cfg['alias'][k] |
172 if self.plain('revsetalias'): | |
173 for k, v in cfg.items('revsetalias'): | |
174 del cfg['revsetalias'][k] | |
172 | 175 |
173 if trusted: | 176 if trusted: |
174 self._tcfg.update(cfg) | 177 self._tcfg.update(cfg) |
175 self._tcfg.update(self._ocfg) | 178 self._tcfg.update(self._ocfg) |
176 self._ucfg.update(cfg) | 179 self._ucfg.update(cfg) |