mercurial/revset.py
changeset 31662 080734cd2440
parent 31076 0e07855e6054
child 31809 35b8bb1ef02b
--- a/mercurial/revset.py	Mon Mar 13 10:41:13 2017 +0100
+++ b/mercurial/revset.py	Fri Feb 24 18:39:08 2017 +0100
@@ -945,11 +945,7 @@
     lr = getrange(args['lines'][0], _("followlines expects a line range"))
     fromline, toline = [getinteger(a, _("line range bounds must be integers"))
                         for a in lr]
-    if toline - fromline < 0:
-        raise error.ParseError(_("line range must be positive"))
-    if fromline < 1:
-        raise error.ParseError(_("fromline must be strictly positive"))
-    fromline -= 1
+    fromline, toline = util.processlinerange(fromline, toline)
 
     fctx = repo[rev].filectx(fname)
     revs = (c.rev() for c, _linerange