##// END OF EJS Templates
hgweb: avoid initialization race (issue4280)
Matt Mackall -
r21759:bd3360c6 stable
parent child Browse files
Show More
@@ -109,8 +109,6 b' class hgweb(object):'
109 # compare changelog size in addition to mtime to catch
109 # compare changelog size in addition to mtime to catch
110 # rollbacks made less than a second ago
110 # rollbacks made less than a second ago
111 if st.st_mtime != self.mtime or st.st_size != self.size:
111 if st.st_mtime != self.mtime or st.st_size != self.size:
112 self.mtime = st.st_mtime
113 self.size = st.st_size
114 r = hg.repository(self.repo.baseui, self.repo.root)
112 r = hg.repository(self.repo.baseui, self.repo.root)
115 self.repo = self._getview(r)
113 self.repo = self._getview(r)
116 self.maxchanges = int(self.config("web", "maxchanges", 10))
114 self.maxchanges = int(self.config("web", "maxchanges", 10))
@@ -121,6 +119,9 b' class hgweb(object):'
121 self.allowpull = self.configbool("web", "allowpull", True)
119 self.allowpull = self.configbool("web", "allowpull", True)
122 encoding.encoding = self.config("web", "encoding",
120 encoding.encoding = self.config("web", "encoding",
123 encoding.encoding)
121 encoding.encoding)
122 # update these last to avoid threads seeing empty settings
123 self.mtime = st.st_mtime
124 self.size = st.st_size
124 if request:
125 if request:
125 self.repo.ui.environ = request.env
126 self.repo.ui.environ = request.env
126
127
General Comments 0
You need to be logged in to leave comments. Login now