Show More
@@ -119,7 +119,8 b' class hgweb:' | |||
|
119 | 119 | def __init__(self, path, name, templates = ""): |
|
120 | 120 | self.templates = templates or templatepath() |
|
121 | 121 | self.reponame = name |
|
122 |
self. |
|
|
122 | self.path = path | |
|
123 | self.mtime = -1 | |
|
123 | 124 | self.viewonly = 0 |
|
124 | 125 | |
|
125 | 126 | self.filters = { |
@@ -131,6 +132,11 b' class hgweb:' | |||
|
131 | 132 | "firstline": (lambda x: x.splitlines(1)[0]), |
|
132 | 133 | } |
|
133 | 134 | |
|
135 | def refresh(self): | |
|
136 | s = os.stat(os.path.join(self.path, ".hg", "00changelog.i")) | |
|
137 | if s.st_mtime != self.mtime: | |
|
138 | self.repo = repository(ui(), self.path) | |
|
139 | ||
|
134 | 140 | def date(self, cs): |
|
135 | 141 | return time.asctime(time.gmtime(float(cs[2].split(' ')[0]))) |
|
136 | 142 | |
@@ -566,6 +572,7 b' class hgweb:' | |||
|
566 | 572 | # find tag, changeset, file |
|
567 | 573 | |
|
568 | 574 | def run(self): |
|
575 | self.refresh() | |
|
569 | 576 | args = cgi.parse() |
|
570 | 577 | |
|
571 | 578 | m = os.path.join(self.templates, "map") |
General Comments 0
You need to be logged in to leave comments.
Login now