equal
deleted
inserted
replaced
941 parentscache[rev].append(entry) |
941 parentscache[rev].append(entry) |
942 |
942 |
943 for p in parentscache[rev]: |
943 for p in parentscache[rev]: |
944 yield p |
944 yield p |
945 |
945 |
946 def annotate(**map): |
946 def annotate(context): |
947 if fctx.isbinary(): |
947 if fctx.isbinary(): |
948 mt = (mimetypes.guess_type(fctx.path())[0] |
948 mt = (mimetypes.guess_type(fctx.path())[0] |
949 or 'application/octet-stream') |
949 or 'application/octet-stream') |
950 lines = [dagop.annotateline(fctx=fctx.filectx(fctx.filerev()), |
950 lines = [dagop.annotateline(fctx=fctx.filectx(fctx.filerev()), |
951 lineno=1, text='(binary:%s)' % mt)] |
951 lineno=1, text='(binary:%s)' % mt)] |
984 diffopts = {k: getattr(diffopts, k) for k in diffopts.defaults} |
984 diffopts = {k: getattr(diffopts, k) for k in diffopts.defaults} |
985 |
985 |
986 return web.sendtemplate( |
986 return web.sendtemplate( |
987 'fileannotate', |
987 'fileannotate', |
988 file=f, |
988 file=f, |
989 annotate=annotate, |
989 annotate=templateutil.mappinggenerator(annotate), |
990 path=webutil.up(f), |
990 path=webutil.up(f), |
991 symrev=webutil.symrevorshortnode(web.req, fctx), |
991 symrev=webutil.symrevorshortnode(web.req, fctx), |
992 rename=webutil.renamelink(fctx), |
992 rename=webutil.renamelink(fctx), |
993 permissions=fctx.manifest().flags(f), |
993 permissions=fctx.manifest().flags(f), |
994 ishead=int(ishead), |
994 ishead=int(ishead), |