##// END OF EJS Templates
revsetlang: unnest "if True" in formatrevspec()
Yuya Nishihara -
r35573:a480551b default
parent child Browse files
Show More
@@ -630,22 +630,20 b' def formatspec(expr, *args):'
630 break
630 break
631 ret.append(expr[pos:q])
631 ret.append(expr[pos:q])
632 pos = q + 1
632 pos = q + 1
633 if True:
633 d = expr[pos]
634 if d == '%':
635 ret.append(d)
636 elif d in 'dsnbr':
637 ret.append(argtype(d, args[arg]))
638 arg += 1
639 elif d == 'l':
640 # a list of some type
641 pos += 1
634 d = expr[pos]
642 d = expr[pos]
635 if d == '%':
643 ret.append(listexp(list(args[arg]), d))
636 ret.append(d)
644 arg += 1
637 elif d in 'dsnbr':
645 else:
638 ret.append(argtype(d, args[arg]))
646 raise error.Abort(_('unexpected revspec format character %s') % d)
639 arg += 1
640 elif d == 'l':
641 # a list of some type
642 pos += 1
643 d = expr[pos]
644 ret.append(listexp(list(args[arg]), d))
645 arg += 1
646 else:
647 raise error.Abort(_('unexpected revspec format character %s')
648 % d)
649 pos += 1
647 pos += 1
650
648
651 return ''.join(ret)
649 return ''.join(ret)
General Comments 0
You need to be logged in to leave comments. Login now