Mercurial > public > mercurial-scm > hg-stable
diff mercurial/hgweb/webcommands.py @ 10282:08a0f04b56bd
many, many trivial check-code fixups
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 25 Jan 2010 00:05:27 -0600 |
parents | d6512b3e9ac0 |
children | 4612cded5176 |
line wrap: on
line diff
--- a/mercurial/hgweb/webcommands.py Mon Jan 25 00:05:22 2010 -0600 +++ b/mercurial/hgweb/webcommands.py Mon Jan 25 00:05:27 2010 -0600 @@ -228,7 +228,7 @@ start = max(0, pos - revcount + 1) end = min(count, start + revcount) pos = end - 1 - parity = paritygen(web.stripecount, offset=start-end) + parity = paritygen(web.stripecount, offset=start - end) changenav = webutil.revnavgen(pos, revcount, count, web.repo.changectx) @@ -334,7 +334,7 @@ emptydirs = [] h = dirs[d] while isinstance(h, dict) and len(h) == 1: - k,v = h.items()[0] + k, v = h.items()[0] if v: emptydirs.append(k) h = v @@ -378,9 +378,9 @@ return tmpl("tags", node=hex(web.repo.changelog.tip()), - entries=lambda **x: entries(False,0, **x), - entriesnotip=lambda **x: entries(True,0, **x), - latestentry=lambda **x: entries(True,1, **x)) + entries=lambda **x: entries(False, 0, **x), + entriesnotip=lambda **x: entries(True, 0, **x), + latestentry=lambda **x: entries(True, 1, **x)) def branches(web, req, tmpl): b = web.repo.branchtags() @@ -437,14 +437,14 @@ b = web.repo.branchtags() l = [(-web.repo.changelog.rev(n), n, t) for t, n in b.iteritems()] - for r,n,t in sorted(l): + for r, n, t in sorted(l): yield {'parity': parity.next(), 'branch': t, 'node': hex(n), 'date': web.repo[n].date()} def changelist(**map): - parity = paritygen(web.stripecount, offset=start-end) + 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[i] @@ -600,7 +600,7 @@ count = fctx.filerev() + 1 start = max(0, fctx.filerev() - revcount + 1) # first rev on this page end = min(count, start + revcount) # last rev on this page - parity = paritygen(web.stripecount, offset=start-end) + parity = paritygen(web.stripecount, offset=start - end) def entries(limit=0, **map): l = []