Mercurial > public > mercurial-scm > hg
comparison mercurial/revsetlang.py @ 31603:fbe8502c4480
revsetlang: portably bytestring-ify another pair of int() calls
author | Augie Fackler <augie@google.com> |
---|---|
date | Thu, 23 Mar 2017 10:33:20 -0400 |
parents | 553ad16b274f |
children | 7eac6fcf2ffa |
comparison
equal
deleted
inserted
replaced
31602:772878ac930e | 31603:fbe8502c4480 |
---|---|
609 def quote(s): | 609 def quote(s): |
610 return repr(str(s)) | 610 return repr(str(s)) |
611 | 611 |
612 def argtype(c, arg): | 612 def argtype(c, arg): |
613 if c == 'd': | 613 if c == 'd': |
614 return str(int(arg)) | 614 return '%d' % int(arg) |
615 elif c == 's': | 615 elif c == 's': |
616 return quote(arg) | 616 return quote(arg) |
617 elif c == 'r': | 617 elif c == 'r': |
618 parse(arg) # make sure syntax errors are confined | 618 parse(arg) # make sure syntax errors are confined |
619 return '(%s)' % arg | 619 return '(%s)' % arg |