mercurial/hgweb/webutil.py
changeset 6747 f6c00b17387c
parent 6437 101526031d06
child 6750 fb42030d79d6
--- a/mercurial/hgweb/webutil.py	Thu Jun 26 13:58:24 2008 -0500
+++ b/mercurial/hgweb/webutil.py	Thu Jun 26 14:35:46 2008 -0500
@@ -120,11 +120,10 @@
         changeid = repo.changelog.count() - 1
 
     try:
-        ctx = repo.changectx(changeid)
+        ctx = repo[changeid]
     except RepoError:
         man = repo.manifest
-        mn = man.lookup(changeid)
-        ctx = repo.changectx(man.linkrev(mn))
+        ctx = repo[man.linkrev(man.lookup(changeid))]
 
     return ctx
 
@@ -135,8 +134,7 @@
     else:
         changeid = req.form['filenode'][0]
     try:
-        ctx = repo.changectx(changeid)
-        fctx = ctx.filectx(path)
+        fctx = repo[changeid][path]
     except RepoError:
         fctx = repo.filectx(path, fileid=changeid)