comparison mercurial/revset.py @ 41562:1c04894e8fe1

revset: allow to parse single integer as a range Even though this wouldn't be any useful in followlines(), it helps to unify range processing.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 27 Jan 2019 13:28:45 +0900
parents 59638c6fcb70
children 13f7a6a4f0db
comparison
equal deleted inserted replaced
41561:59638c6fcb70 41562:1c04894e8fe1
1069 msg = _("followlines expects exactly one file") 1069 msg = _("followlines expects exactly one file")
1070 fname = scmutil.parsefollowlinespattern(repo, rev, pat, msg) 1070 fname = scmutil.parsefollowlinespattern(repo, rev, pat, msg)
1071 fromline, toline = util.processlinerange( 1071 fromline, toline = util.processlinerange(
1072 *getintrange(args['lines'][0], 1072 *getintrange(args['lines'][0],
1073 # i18n: "followlines" is a keyword 1073 # i18n: "followlines" is a keyword
1074 _("followlines expects a line range"), 1074 _("followlines expects a line number or a range"),
1075 _("line range bounds must be integers"))) 1075 _("line range bounds must be integers")))
1076 1076
1077 fctx = repo[rev].filectx(fname) 1077 fctx = repo[rev].filectx(fname)
1078 descend = False 1078 descend = False
1079 if 'descend' in args: 1079 if 'descend' in args: