mercurial/hgweb/webutil.py
changeset 30081 dd0ff715a82c
parent 29216 ead25aa27a43
child 30375 11b8b740d54a
--- a/mercurial/hgweb/webutil.py	Tue Oct 04 20:49:59 2016 +0800
+++ b/mercurial/hgweb/webutil.py	Sat Oct 08 16:10:34 2016 +0100
@@ -164,6 +164,11 @@
     def __len__(self):
         return len(self.siblings)
 
+def annotate(fctx, ui):
+    diffopts = patch.difffeatureopts(ui, untrusted=True,
+                                     section='annotate', whitespace=True)
+    return fctx.annotate(follow=True, linenumber=True, diffopts=diffopts)
+
 def parents(ctx, hide=None):
     if isinstance(ctx, context.basefilectx):
         introrev = ctx.introrev()