Show More
@@ -86,15 +86,12 b' def _statusmessage(code):' | |||
|
86 | 86 | def statusmessage(code, message=None): |
|
87 | 87 | return '%d %s' % (code, message or _statusmessage(code)) |
|
88 | 88 | |
|
89 |
def get_mtime( |
|
|
90 |
|
|
|
91 | if not os.path.isdir(os.path.join(store_path, "data")): | |
|
92 | store_path = os.path.join(store_path, "store") | |
|
93 | cl_path = os.path.join(store_path, "00changelog.i") | |
|
89 | def get_mtime(spath): | |
|
90 | cl_path = os.path.join(spath, "00changelog.i") | |
|
94 | 91 | if os.path.exists(cl_path): |
|
95 | 92 | return os.stat(cl_path).st_mtime |
|
96 | 93 | else: |
|
97 |
return os.stat(s |
|
|
94 | return os.stat(spath).st_mtime | |
|
98 | 95 | |
|
99 | 96 | def staticfile(directory, fname, req): |
|
100 | 97 | """return a file inside directory with guessed Content-Type header |
@@ -57,7 +57,7 b' class hgweb(object):' | |||
|
57 | 57 | def refresh(self, request=None): |
|
58 | 58 | if request: |
|
59 | 59 | self.repo.ui.environ = request.env |
|
60 |
mtime = get_mtime(self.repo. |
|
|
60 | mtime = get_mtime(self.repo.spath) | |
|
61 | 61 | if mtime != self.mtime: |
|
62 | 62 | self.mtime = mtime |
|
63 | 63 | self.repo = hg.repository(self.repo.ui, self.repo.root) |
@@ -235,7 +235,8 b' class hgwebdir(object):' | |||
|
235 | 235 | |
|
236 | 236 | # update time with local timezone |
|
237 | 237 | try: |
|
238 | d = (get_mtime(path), util.makedate()[1]) | |
|
238 | r = hg.repository(self.ui, path) | |
|
239 | d = (get_mtime(r.spath), util.makedate()[1]) | |
|
239 | 240 | except OSError: |
|
240 | 241 | continue |
|
241 | 242 |
General Comments 0
You need to be logged in to leave comments.
Login now