mercurial/hgweb/webcommands.py
changeset 31667 e540846c67e0
parent 31665 5e6d44511317
child 31727 6be6e4becaaf
--- a/mercurial/hgweb/webcommands.py	Mon Mar 13 15:15:49 2017 +0100
+++ b/mercurial/hgweb/webcommands.py	Mon Mar 13 15:17:20 2017 +0100
@@ -993,11 +993,12 @@
     if 'style' in req.form:
         diffstyle = req.form['style'][0]
 
-    def diff(fctx):
+    def diff(fctx, linerange=None):
         ctx = fctx.changectx()
         basectx = ctx.p1()
         path = fctx.path()
-        return webutil.diffs(web, tmpl, ctx, basectx, [path], diffstyle)
+        return webutil.diffs(web, tmpl, ctx, basectx, [path], diffstyle,
+                             linerange=linerange)
 
     linerange = None
     if lrange is not None:
@@ -1009,7 +1010,7 @@
         for i, (c, lr) in enumerate(ancestors, 1):
             diffs = None
             if patch:
-                diffs = diff(c)
+                diffs = diff(c, linerange=lr)
             # follow renames accross filtered (not in range) revisions
             path = c.path()
             entries.append(dict(