Show More
@@ -131,11 +131,13 b' class hgweb(object):' | |||||
131 |
|
131 | |||
132 | def refresh(self, request=None): |
|
132 | def refresh(self, request=None): | |
133 | repostate = [] |
|
133 | repostate = [] | |
|
134 | mtime = 0 | |||
134 | # file of interrests mtime and size |
|
135 | # file of interrests mtime and size | |
135 | for meth, fname in foi: |
|
136 | for meth, fname in foi: | |
136 | prefix = getattr(self.repo, meth) |
|
137 | prefix = getattr(self.repo, meth) | |
137 | st = get_stat(prefix, fname) |
|
138 | st = get_stat(prefix, fname) | |
138 | repostate.append((st.st_mtime, st.st_size)) |
|
139 | repostate.append((st.st_mtime, st.st_size)) | |
|
140 | mtime = max(mtime, st.st_mtime) | |||
139 | repostate = tuple(repostate) |
|
141 | repostate = tuple(repostate) | |
140 | # we need to compare file size in addition to mtime to catch |
|
142 | # we need to compare file size in addition to mtime to catch | |
141 | # changes made less than a second ago |
|
143 | # changes made less than a second ago | |
@@ -153,7 +155,7 b' class hgweb(object):' | |||||
153 | # update these last to avoid threads seeing empty settings |
|
155 | # update these last to avoid threads seeing empty settings | |
154 | self.repostate = repostate |
|
156 | self.repostate = repostate | |
155 | # mtime is needed for ETag |
|
157 | # mtime is needed for ETag | |
156 |
self.mtime = |
|
158 | self.mtime = mtime | |
157 | if request: |
|
159 | if request: | |
158 | self.repo.ui.environ = request.env |
|
160 | self.repo.ui.environ = request.env | |
159 |
|
161 |
General Comments 0
You need to be logged in to leave comments.
Login now