Use commit time instead of stat to check time of last change.
authorThomas Arendsen Hein <thomas@intevation.de>
Sun, 28 Aug 2005 19:50:13 +0200
changeset 1138 51f26e856f3d
parent 1137 c54d03bdf2dc
child 1139 916bb2849c4c
Use commit time instead of stat to check time of last change.
mercurial/hgweb.py
--- a/mercurial/hgweb.py	Sun Aug 28 19:18:39 2005 +0200
+++ b/mercurial/hgweb.py	Sun Aug 28 19:50:13 2005 +0200
@@ -947,6 +947,7 @@
 
                 url = os.environ["REQUEST_URI"] + "/" + name
                 url = url.replace("//", "/")
+                changes = repo.changelog.read(repo.changelog.tip())
 
                 yield dict(contact=get("web", "contact") or
                                    get("web", "author", "unknown"),
@@ -954,8 +955,7 @@
                            url=url,
                            parity=parity,
                            shortdesc=get("web", "description", "unknown"),
-                           lastupdate=os.stat(os.path.join(path, ".hg",
-                                                "00changelog.d")).st_mtime)
+                           lastupdate=float(changes[2].split(' ')[0]))
 
                 parity = 1 - parity