##// END OF EJS Templates
hgweb: avoid initialization race (issue3953)
Matt Mackall -
r20168:d4be314b stable
parent child Browse files
Show More
@@ -59,15 +59,16 b' class hgweb(object):'
59 59 u = baseui.copy()
60 60 else:
61 61 u = ui.ui()
62 self.repo = hg.repository(u, repo)
62 r = hg.repository(u, repo)
63 63 else:
64 self.repo = repo
64 r = repo
65 65
66 self.repo = self._getview(self.repo)
67 self.repo.ui.setconfig('ui', 'report_untrusted', 'off')
68 self.repo.baseui.setconfig('ui', 'report_untrusted', 'off')
69 self.repo.ui.setconfig('ui', 'nontty', 'true')
70 self.repo.baseui.setconfig('ui', 'nontty', 'true')
66 r = self._getview(r)
67 r.ui.setconfig('ui', 'report_untrusted', 'off')
68 r.baseui.setconfig('ui', 'report_untrusted', 'off')
69 r.ui.setconfig('ui', 'nontty', 'true')
70 r.baseui.setconfig('ui', 'nontty', 'true')
71 self.repo = r
71 72 hook.redirect(True)
72 73 self.mtime = -1
73 74 self.size = -1
@@ -94,7 +95,8 b' class hgweb(object):'
94 95 untrusted=untrusted)
95 96
96 97 def _getview(self, repo):
97 viewconfig = self.config('web', 'view', 'served')
98 viewconfig = repo.ui.config('web', 'view', 'served',
99 untrusted=True)
98 100 if viewconfig == 'all':
99 101 return repo.unfiltered()
100 102 elif viewconfig in repoview.filtertable:
General Comments 0
You need to be logged in to leave comments. Login now