comparison mercurial/templatefilters.py @ 36831:82af07e1ae16

py3: fix slicing of bisect label in templatefilters.shortbisect()
author Yuya Nishihara <yuya@tcha.org>
date Tue, 06 Mar 2018 07:16:41 -0600
parents 71f189941791
children 6ff6e1d6b5b8
comparison
equal deleted inserted replaced
36830:71f189941791 36831:82af07e1ae16
347 returns a single-character representing the status (G: good, B: bad, 347 returns a single-character representing the status (G: good, B: bad,
348 S: skipped, U: untested, I: ignored). Returns single space if `text` 348 S: skipped, U: untested, I: ignored). Returns single space if `text`
349 is not a valid bisection status. 349 is not a valid bisection status.
350 """ 350 """
351 if label: 351 if label:
352 return label[0].upper() 352 return label[0:1].upper()
353 return ' ' 353 return ' '
354 354
355 @templatefilter('shortdate') 355 @templatefilter('shortdate')
356 def shortdate(text): 356 def shortdate(text):
357 """Date. Returns a date like "2006-09-18".""" 357 """Date. Returns a date like "2006-09-18"."""