##// END OF EJS Templates
templatefilters: inline hbisect.shortlabel()...
Yuya Nishihara -
r36848:71f18994 default
parent child Browse files
Show More
@@ -267,12 +267,6 b' def label(repo, node):'
267
267
268 return None
268 return None
269
269
270 def shortlabel(label):
271 if label:
272 return label[0].upper()
273
274 return None
275
276 def printresult(ui, repo, state, displayer, nodes, good):
270 def printresult(ui, repo, state, displayer, nodes, good):
277 if len(nodes) == 1:
271 if len(nodes) == 1:
278 # narrowed it down to a single revision
272 # narrowed it down to a single revision
@@ -14,7 +14,6 b' import time'
14 from . import (
14 from . import (
15 encoding,
15 encoding,
16 error,
16 error,
17 hbisect,
18 node,
17 node,
19 pycompat,
18 pycompat,
20 registrar,
19 registrar,
@@ -343,13 +342,15 b' def short(text):'
343 return text[:12]
342 return text[:12]
344
343
345 @templatefilter('shortbisect')
344 @templatefilter('shortbisect')
346 def shortbisect(text):
345 def shortbisect(label):
347 """Any text. Treats `text` as a bisection status, and
346 """Any text. Treats `label` as a bisection status, and
348 returns a single-character representing the status (G: good, B: bad,
347 returns a single-character representing the status (G: good, B: bad,
349 S: skipped, U: untested, I: ignored). Returns single space if `text`
348 S: skipped, U: untested, I: ignored). Returns single space if `text`
350 is not a valid bisection status.
349 is not a valid bisection status.
351 """
350 """
352 return hbisect.shortlabel(text) or ' '
351 if label:
352 return label[0].upper()
353 return ' '
353
354
354 @templatefilter('shortdate')
355 @templatefilter('shortdate')
355 def shortdate(text):
356 def shortdate(text):
General Comments 0
You need to be logged in to leave comments. Login now