Mercurial > public > mercurial-scm > hg
diff mercurial/hgweb/webcommands.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 | 084c9f1ef2bd |
children | fb42030d79d6 |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Thu Jun 26 13:58:24 2008 -0500 +++ b/mercurial/hgweb/webcommands.py Thu Jun 26 14:35:46 2008 -0500 @@ -113,7 +113,7 @@ for i in xrange(cl.count() - 1, 0, -100): l = [] for j in xrange(max(0, i - 100), i + 1): - ctx = web.repo.changectx(j) + ctx = web.repo[j] l.append(ctx) l.reverse() for e in l: @@ -170,7 +170,7 @@ else: hi = web.repo.changelog.count() - 1 try: - ctx = web.repo.changectx(hi) + ctx = web.repo[hi] except RepoError: return _search(web, tmpl, hi) # XXX redirect to 404 page? @@ -178,7 +178,7 @@ cl = web.repo.changelog l = [] # build a list in forward order for efficiency for i in xrange(start, end): - ctx = web.repo.changectx(i) + ctx = web.repo[i] n = ctx.node() showtags = webutil.showtag(web.repo, tmpl, 'changelogtag', n) @@ -299,7 +299,7 @@ yield {"file": full, "parity": parity.next(), "basename": f, - "date": fctx.changectx().date(), + "date": fctx.date(), "size": fctx.size(), "permissions": mf.flags(full)} @@ -343,7 +343,7 @@ count = count + 1 yield {"parity": parity.next(), "tag": k, - "date": web.repo.changectx(n).date(), + "date": web.repo[n].date(), "node": hex(n)} return tmpl("tags", @@ -371,7 +371,7 @@ parity=parity.next(), tag=k, node=hex(n), - date=web.repo.changectx(n).date()) + date=web.repo[n].date()) def branches(**map): parity = paritygen(web.stripecount) @@ -381,17 +381,16 @@ l.sort() for r,n,t in l: - ctx = web.repo.changectx(n) yield {'parity': parity.next(), 'branch': t, 'node': hex(n), - 'date': ctx.date()} + 'date': web.repo[n].date()} def changelist(**map): parity = paritygen(web.stripecount, offset=start-end) l = [] # build a list in forward order for efficiency for i in xrange(start, end): - ctx = web.repo.changectx(i) + ctx = web.repo[i] n = ctx.node() hn = hex(n)