diff --git a/mercurial/hgweb/hgweb_mod.py b/mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py +++ b/mercurial/hgweb/hgweb_mod.py @@ -131,11 +131,13 @@ class hgweb(object): def refresh(self, request=None): repostate = [] + mtime = 0 # file of interrests mtime and size for meth, fname in foi: prefix = getattr(self.repo, meth) st = get_stat(prefix, fname) repostate.append((st.st_mtime, st.st_size)) + mtime = max(mtime, st.st_mtime) repostate = tuple(repostate) # we need to compare file size in addition to mtime to catch # changes made less than a second ago @@ -153,7 +155,7 @@ class hgweb(object): # update these last to avoid threads seeing empty settings self.repostate = repostate # mtime is needed for ETag - self.mtime = st.st_mtime + self.mtime = mtime if request: self.repo.ui.environ = request.env