comparison mercurial/revsetlang.py @ 31636:f3b151278655

revsetlang: fix _quote on int on python3 Thanks to Yuya for spotting the need.
author Augie Fackler <raf@durin42.com>
date Sun, 26 Mar 2017 16:48:29 -0400
parents 0b3eb280564b
children c63cb2d10d6d
comparison
equal deleted inserted replaced
31635:632e07e72a22 31636:f3b151278655
584 >>> _quote('asdf\'') 584 >>> _quote('asdf\'')
585 "'asdf\\''" 585 "'asdf\\''"
586 >>> _quote(1) 586 >>> _quote(1)
587 "'1'" 587 "'1'"
588 """ 588 """
589 return "'%s'" % util.escapestr('%s' % s) 589 return "'%s'" % util.escapestr(pycompat.bytestr(s))
590 590
591 def formatspec(expr, *args): 591 def formatspec(expr, *args):
592 ''' 592 '''
593 This is a convenience function for using revsets internally, and 593 This is a convenience function for using revsets internally, and
594 escapes arguments appropriately. Aliases are intentionally ignored 594 escapes arguments appropriately. Aliases are intentionally ignored