comparison mercurial/util.py @ 23917:3cbb5bf4035d

messages: quote "hg help" hints consistently
author Wagner Bruna <wbruna@yahoo.com>
date Sat, 17 Jan 2015 22:01:14 -0200
parents 4e451d1359de
children e5ce49a30146
comparison
equal deleted inserted replaced
23916:a3f7c781786b 23917:3cbb5bf4035d
1461 try: 1461 try:
1462 days = int(date[1:]) 1462 days = int(date[1:])
1463 except ValueError: 1463 except ValueError:
1464 raise Abort(_("invalid day spec: %s") % date[1:]) 1464 raise Abort(_("invalid day spec: %s") % date[1:])
1465 if days < 0: 1465 if days < 0:
1466 raise Abort(_("%s must be nonnegative (see 'hg help dates')") 1466 raise Abort(_('%s must be nonnegative (see "hg help dates")')
1467 % date[1:]) 1467 % date[1:])
1468 when = makedate()[0] - days * 3600 * 24 1468 when = makedate()[0] - days * 3600 * 24
1469 return lambda x: x >= when 1469 return lambda x: x >= when
1470 elif " to " in date: 1470 elif " to " in date:
1471 a, b = date.split(" to ") 1471 a, b = date.split(" to ")