# HG changeset patch # User Alexis S. L. Carvalho # Date 1161883545 -7200 # Node ID e1508621e9ef81004dc35770d86801155b19561c # Parent 9b52239dc740d8418803a080567f626ec2a2bfd7 add --untrusted to showconfig diff -r 9b52239dc740 -r e1508621e9ef mercurial/commands.py --- a/mercurial/commands.py Thu Oct 26 19:25:45 2006 +0200 +++ b/mercurial/commands.py Thu Oct 26 19:25:45 2006 +0200 @@ -1213,7 +1213,7 @@ error = _(".hg/dirstate inconsistent with current parent's manifest") raise util.Abort(error) -def showconfig(ui, repo, *values): +def showconfig(ui, repo, *values, **opts): """show combined config settings from all hgrc files With no args, print names and values of all config items. @@ -1224,10 +1224,11 @@ With multiple args, print names and values of all config items with matching section names.""" + untrusted = bool(opts.get('untrusted')) if values: if len([v for v in values if '.' in v]) > 1: raise util.Abort(_('only one config item permitted')) - for section, name, value in ui.walkconfig(): + for section, name, value in ui.walkconfig(untrusted=untrusted): sectname = section + '.' + name if values: for v in values: @@ -3097,7 +3098,10 @@ _('hg revert [-r REV] [NAME]...')), "rollback": (rollback, [], _('hg rollback')), "root": (root, [], _('hg root')), - "showconfig|debugconfig": (showconfig, [], _('showconfig [NAME]...')), + "showconfig|debugconfig": + (showconfig, + [('u', 'untrusted', None, _('show untrusted configuration options'))], + _('showconfig [-u] [NAME]...')), "^serve": (serve, [('A', 'accesslog', '', _('name of access log file to write to')),