mercurial/hgweb/webutil.py
changeset 31808 ca3b4a2b7e54
parent 31727 6be6e4becaaf
child 34246 db63872e10cc
--- a/mercurial/hgweb/webutil.py	Fri Apr 22 21:46:33 2016 +0900
+++ b/mercurial/hgweb/webutil.py	Sat Apr 01 12:24:59 2017 +0200
@@ -27,6 +27,7 @@
     context,
     error,
     match,
+    mdiff,
     patch,
     pathutil,
     templatefilters,
@@ -473,8 +474,7 @@
         for hunkrange, hunklines in hunks:
             if linerange is not None and hunkrange is not None:
                 s1, l1, s2, l2 = hunkrange
-                lb, ub = linerange
-                if not (lb < s2 + l2 and ub > s2):
+                if not mdiff.hunkinrange((s2, l2), linerange):
                     continue
             lines.extend(hunklines)
         if lines: