comparison mercurial/templater.py @ 27293:9e06e7fb037d

grammar: favor zero, one, two over ... or no
author timeless <timeless@mozdev.org>
date Mon, 30 Nov 2015 19:30:16 +0000
parents 56b2bcea2529
children b502138f5faa
comparison
equal deleted inserted replaced
27292:14a83e8e1b88 27293:9e06e7fb037d
334 def diff(context, mapping, args): 334 def diff(context, mapping, args):
335 """:diff([includepattern [, excludepattern]]): Show a diff, optionally 335 """:diff([includepattern [, excludepattern]]): Show a diff, optionally
336 specifying files to include or exclude.""" 336 specifying files to include or exclude."""
337 if len(args) > 2: 337 if len(args) > 2:
338 # i18n: "diff" is a keyword 338 # i18n: "diff" is a keyword
339 raise error.ParseError(_("diff expects one, two or no arguments")) 339 raise error.ParseError(_("diff expects zero, one, or two arguments"))
340 340
341 def getpatterns(i): 341 def getpatterns(i):
342 if i < len(args): 342 if i < len(args):
343 s = stringify(args[i][0](context, mapping, args[i][1])).strip() 343 s = stringify(args[i][0](context, mapping, args[i][1])).strip()
344 if s: 344 if s: