comparison mercurial/hbisect.py @ 36830:71f189941791

templatefilters: inline hbisect.shortlabel() It's pretty simple. I don't think the business logic has to be placed in hbisect.py.
author Yuya Nishihara <yuya@tcha.org>
date Tue, 06 Mar 2018 07:15:01 -0600
parents 80da79b6fbe4
children 566daffc607d
comparison
equal deleted inserted replaced
36829:4eb3bf227ce7 36830:71f189941791
265 # i18n: bisect changeset status 265 # i18n: bisect changeset status
266 return _('bad (implicit)') 266 return _('bad (implicit)')
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
279 if good: 273 if good:
280 ui.write(_("The first good revision is:\n")) 274 ui.write(_("The first good revision is:\n"))