Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/common.py @ 10078:97c75ad3b1a0
hgweb: Make get_mtime use repository to find store path.
It was calculating it directly, which is redundant and caused
it to break with shared repositories.
author | Brendan Cully <brendan@kublai.com> |
---|---|
date | Tue, 15 Dec 2009 12:33:04 -0800 |
parents | 6f92997dbdca |
children | d6512b3e9ac0 |
line wrap: on
line diff
--- a/mercurial/hgweb/common.py Sun Dec 13 18:29:16 2009 +0100 +++ b/mercurial/hgweb/common.py Tue Dec 15 12:33:04 2009 -0800 @@ -86,15 +86,12 @@ def statusmessage(code, message=None): return '%d %s' % (code, message or _statusmessage(code)) -def get_mtime(repo_path): - store_path = os.path.join(repo_path, ".hg") - if not os.path.isdir(os.path.join(store_path, "data")): - store_path = os.path.join(store_path, "store") - cl_path = os.path.join(store_path, "00changelog.i") +def get_mtime(spath): + cl_path = os.path.join(spath, "00changelog.i") if os.path.exists(cl_path): return os.stat(cl_path).st_mtime else: - return os.stat(store_path).st_mtime + return os.stat(spath).st_mtime def staticfile(directory, fname, req): """return a file inside directory with guessed Content-Type header