comparison mercurial/hgweb/webutil.py @ 7311:de9c87fe1620

hgweb: move another utility function into the webutil module
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Mon, 03 Nov 2008 20:31:53 +0100
parents bd522d09d5e3
children 55651328dfcc
comparison
equal deleted inserted replaced
7310:bd522d09d5e3 7311:de9c87fe1620
141 except RepoError: 141 except RepoError:
142 fctx = repo.filectx(path, fileid=changeid) 142 fctx = repo.filectx(path, fileid=changeid)
143 143
144 return fctx 144 return fctx
145 145
146 def listfilediffs(tmpl, files, node, max):
147 for f in files[:max]:
148 yield tmpl('filedifflink', node=hex(node), file=f)
149 if len(files) > max:
150 yield tmpl('fileellipses')
151
146 def diffs(repo, tmpl, ctx, files, parity): 152 def diffs(repo, tmpl, ctx, files, parity):
147 153
148 def countgen(): 154 def countgen():
149 start = 1 155 start = 1
150 while True: 156 while True: