##// END OF EJS Templates
Turn of "Not trusting file" logging when running hgweb and hgwebdir...
Thomas Arendsen Hein -
r3557:f7dee427 default
parent child Browse files
Show More
@@ -69,7 +69,7 b' def revnavgen(pos, pagelen, limit, nodef'
69 class hgweb(object):
69 class hgweb(object):
70 def __init__(self, repo, name=None):
70 def __init__(self, repo, name=None):
71 if type(repo) == type(""):
71 if type(repo) == type(""):
72 self.repo = hg.repository(ui.ui(), repo)
72 self.repo = hg.repository(ui.ui(report_untrusted=False), repo)
73 else:
73 else:
74 self.repo = repo
74 self.repo = repo
75
75
@@ -110,7 +110,7 b' class hgwebdir(object):'
110 rows = []
110 rows = []
111 parity = 0
111 parity = 0
112 for name, path in self.repos:
112 for name, path in self.repos:
113 u = ui.ui()
113 u = ui.ui(report_untrusted=False)
114 try:
114 try:
115 u.readconfig(os.path.join(path, '.hg', 'hgrc'))
115 u.readconfig(os.path.join(path, '.hg', 'hgrc'))
116 except IOError:
116 except IOError:
@@ -26,7 +26,8 b' def updateconfig(source, dest, sections='
26
26
27 class ui(object):
27 class ui(object):
28 def __init__(self, verbose=False, debug=False, quiet=False,
28 def __init__(self, verbose=False, debug=False, quiet=False,
29 interactive=True, traceback=False, parentui=None):
29 interactive=True, traceback=False, report_untrusted=True,
30 parentui=None):
30 self.overlay = None
31 self.overlay = None
31 self.header = []
32 self.header = []
32 self.prev_header = []
33 self.prev_header = []
@@ -39,6 +40,7 b' class ui(object):'
39 self.debugflag = debug
40 self.debugflag = debug
40 self.interactive = interactive
41 self.interactive = interactive
41 self.traceback = traceback
42 self.traceback = traceback
43 self.report_untrusted = report_untrusted
42 self.trusted_users = {}
44 self.trusted_users = {}
43 self.trusted_groups = {}
45 self.trusted_groups = {}
44 # if ucdata is not None, its keys must be a superset of cdata's
46 # if ucdata is not None, its keys must be a superset of cdata's
@@ -98,7 +100,7 b' class ui(object):'
98 user = util.username(st.st_uid)
100 user = util.username(st.st_uid)
99 group = util.groupname(st.st_gid)
101 group = util.groupname(st.st_gid)
100 if user not in tusers and group not in tgroups:
102 if user not in tusers and group not in tgroups:
101 if warn:
103 if warn and self.report_untrusted:
102 self.warn(_('Not trusting file %s from untrusted '
104 self.warn(_('Not trusting file %s from untrusted '
103 'user %s, group %s\n') % (f, user, group))
105 'user %s, group %s\n') % (f, user, group))
104 return False
106 return False
General Comments 0
You need to be logged in to leave comments. Login now