##// END OF EJS Templates
New config option: ui.report_untrusted (defaults to True)
Thomas Arendsen Hein -
r4717:97369f6a default
parent child Browse files
Show More
@@ -452,6 +452,9 b' ui::'
452 Reduce the amount of output printed. True or False. Default is False.
452 Reduce the amount of output printed. True or False. Default is False.
453 remotecmd;;
453 remotecmd;;
454 remote command to use for clone/push/pull operations. Default is 'hg'.
454 remote command to use for clone/push/pull operations. Default is 'hg'.
455 report_untrusted;;
456 Warn if a .hg/hgrc file is ignored due to not being owned by a
457 trusted user or group. True or False. Default is True.
455 slash;;
458 slash;;
456 Display paths using a slash ("/") as the path separator. This only
459 Display paths using a slash ("/") as the path separator. This only
457 makes a difference on systems where the default path separator is not
460 makes a difference on systems where the default path separator is not
@@ -275,7 +275,13 b' def dispatch(ui, args, argv0=None):'
275 # remember how to call 'hg' before changing the working dir
275 # remember how to call 'hg' before changing the working dir
276 util.set_hgexecutable(argv0)
276 util.set_hgexecutable(argv0)
277
277
278 # check for cwd first
278 # read --config before doing anything else
279 # (e.g. to change trust settings for reading .hg/hgrc)
280 config = earlygetopt(['--config'], args)
281 if config:
282 ui.updateopts(config=parseconfig(config))
283
284 # check for cwd
279 cwd = earlygetopt(['--cwd'], args)
285 cwd = earlygetopt(['--cwd'], args)
280 if cwd:
286 if cwd:
281 os.chdir(cwd[-1])
287 os.chdir(cwd[-1])
@@ -325,8 +331,7 b' def dispatch(ui, args, argv0=None):'
325 atexit.register(print_time)
331 atexit.register(print_time)
326
332
327 ui.updateopts(options["verbose"], options["debug"], options["quiet"],
333 ui.updateopts(options["verbose"], options["debug"], options["quiet"],
328 not options["noninteractive"], options["traceback"],
334 not options["noninteractive"], options["traceback"])
329 parseconfig(options["config"]))
330
335
331 if options['help']:
336 if options['help']:
332 return commands.help_(ui, cmd, options['version'])
337 return commands.help_(ui, cmd, options['version'])
@@ -199,13 +199,15 b' class ui(object):'
199 if path and "://" not in path and not os.path.isabs(path):
199 if path and "://" not in path and not os.path.isabs(path):
200 cdata.set("paths", n, os.path.join(root, path))
200 cdata.set("paths", n, os.path.join(root, path))
201
201
202 # update quiet/verbose/debug and interactive status
202 # update verbosity/interactive/report_untrusted settings
203 if section is None or section == 'ui':
203 if section is None or section == 'ui':
204 if name is None or name in ('quiet', 'verbose', 'debug'):
204 if name is None or name in ('quiet', 'verbose', 'debug'):
205 self.verbosity_constraints()
205 self.verbosity_constraints()
206
207 if name is None or name == 'interactive':
206 if name is None or name == 'interactive':
208 self.interactive = self.configbool("ui", "interactive", True)
207 self.interactive = self.configbool("ui", "interactive", True)
208 if name is None or name == 'report_untrusted':
209 self.report_untrusted = (
210 self.configbool("ui", "report_untrusted", True))
209
211
210 # update trust information
212 # update trust information
211 if (section is None or section == 'trusted') and self.trusted_users:
213 if (section is None or section == 'trusted') and self.trusted_users:
General Comments 0
You need to be logged in to leave comments. Login now