##// END OF EJS Templates
revsetlang: move quoting function to not be a closure...
Augie Fackler -
r31604:7eac6fcf default
parent child Browse files
Show More
@@ -573,6 +573,9 b' def foldconcat(tree):'
573 573 def parse(spec, lookup=None):
574 574 return _parsewith(spec, lookup=lookup)
575 575
576 def _quote(s):
577 return repr(str(s))
578
576 579 def formatspec(expr, *args):
577 580 '''
578 581 This is a convenience function for using revsets internally, and
@@ -606,21 +609,18 b' def formatspec(expr, *args):'
606 609 "root(_list('a\\x00b\\x00c\\x00d'))"
607 610 '''
608 611
609 def quote(s):
610 return repr(str(s))
611
612 612 def argtype(c, arg):
613 613 if c == 'd':
614 614 return '%d' % int(arg)
615 615 elif c == 's':
616 return quote(arg)
616 return _quote(arg)
617 617 elif c == 'r':
618 618 parse(arg) # make sure syntax errors are confined
619 619 return '(%s)' % arg
620 620 elif c == 'n':
621 return quote(node.hex(arg))
621 return _quote(node.hex(arg))
622 622 elif c == 'b':
623 return quote(arg.branch())
623 return _quote(arg.branch())
624 624
625 625 def listexp(s, t):
626 626 l = len(s)
General Comments 0
You need to be logged in to leave comments. Login now