equal
deleted
inserted
replaced
8 |
8 |
9 import os, mimetypes |
9 import os, mimetypes |
10 import os.path |
10 import os.path |
11 |
11 |
12 def get_mtime(repo_path): |
12 def get_mtime(repo_path): |
13 hg_path = os.path.join(repo_path, ".hg") |
13 store_path = os.path.join(repo_path, ".hg") |
14 cl_path = os.path.join(hg_path, "00changelog.i") |
14 if not os.path.isdir(os.path.join(store_path, "data")): |
15 if os.path.exists(os.path.join(cl_path)): |
15 store_path = os.path.join(store_path, "store") |
|
16 cl_path = os.path.join(store_path, "00changelog.i") |
|
17 if os.path.exists(cl_path): |
16 return os.stat(cl_path).st_mtime |
18 return os.stat(cl_path).st_mtime |
17 else: |
19 else: |
18 return os.stat(hg_path).st_mtime |
20 return os.stat(store_path).st_mtime |
19 |
21 |
20 def staticfile(directory, fname, req): |
22 def staticfile(directory, fname, req): |
21 """return a file inside directory with guessed content-type header |
23 """return a file inside directory with guessed content-type header |
22 |
24 |
23 fname always uses '/' as directory separator and isn't allowed to |
25 fname always uses '/' as directory separator and isn't allowed to |