##// END OF EJS Templates
hgweb: enumerate lines in loop header, not before...
av6 -
r29538:df7d8ea9 default
parent child Browse files
Show More
@@ -875,13 +875,12 b' def annotate(web, req, tmpl):'
875 if util.binary(fctx.data()):
875 if util.binary(fctx.data()):
876 mt = (mimetypes.guess_type(fctx.path())[0]
876 mt = (mimetypes.guess_type(fctx.path())[0]
877 or 'application/octet-stream')
877 or 'application/octet-stream')
878 lines = enumerate([((fctx.filectx(fctx.filerev()), 1),
878 lines = [((fctx.filectx(fctx.filerev()), 1), '(binary:%s)' % mt)]
879 '(binary:%s)' % mt)])
880 else:
879 else:
881 lines = enumerate(fctx.annotate(follow=True, linenumber=True,
880 lines = fctx.annotate(follow=True, linenumber=True,
882 diffopts=diffopts))
881 diffopts=diffopts)
883 previousrev = None
882 previousrev = None
884 for lineno, ((f, targetline), l) in lines:
883 for lineno, ((f, targetline), l) in enumerate(lines):
885 rev = f.rev()
884 rev = f.rev()
886 blockhead = rev != previousrev or None
885 blockhead = rev != previousrev or None
887 previousrev = rev
886 previousrev = rev
General Comments 0
You need to be logged in to leave comments. Login now