Mercurial > hg-stable
changeset 3676:d94664748bc1
Use a variable to explicitly trust global config files
author | Alexis S. L. Carvalho <alexis@cecm.usp.br> |
---|---|
date | Sat, 18 Nov 2006 23:51:13 -0200 |
parents | 6990e499d71a |
children | 1a0fa3914c46 |
files | mercurial/ui.py |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/ui.py Sat Nov 18 19:44:42 2006 -0200 +++ b/mercurial/ui.py Sat Nov 18 23:51:13 2006 -0200 @@ -44,7 +44,10 @@ # if ucdata is not None, its keys must be a superset of cdata's self.cdata = util.configparser() self.ucdata = None + # we always trust global config files + self.check_trusted = False self.readconfig(util.rcpath()) + self.check_trusted = True self.updateopts(verbose, debug, quiet, interactive) else: # parentui may point to an ui object which is already a child @@ -91,6 +94,8 @@ self.quiet = self.verbose = False def _is_trusted(self, fp, f, warn=True): + if not self.check_trusted: + return True tusers = self.trusted_users tgroups = self.trusted_groups if (tusers or tgroups) and '*' not in tusers and '*' not in tgroups: