Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/webutil.py @ 6747:f6c00b17387c
use repo[changeid] to get a changectx
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 26 Jun 2008 14:35:46 -0500 |
parents | 101526031d06 |
children | fb42030d79d6 |
line wrap: on
line diff
--- 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)