Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.0, 1.0.1, and 1.0.2

csinfo: add 'shortuser' item

'shortuser' doesn't contain email address.

Changeset 428e88a2cdd2

Parent 53cf475bece9

by Yuki KODAMA

Changes to one file · Browse files at 428e88a2cdd2 Showing diff from parent 53cf475bece9 Diff from another changeset...

 
201
202
203
204
 
 
205
206
207
 
230
231
232
 
 
233
234
235
 
352
353
354
355
 
 
356
357
358
 
201
202
203
 
204
205
206
207
208
 
231
232
233
234
235
236
237
238
 
355
356
357
 
358
359
360
361
362
@@ -201,7 +201,8 @@
  'dateage': _('Date:'), 'branch': _('Branch:'),   'tags': _('Tags:'), 'rawbranch': _('Branch:'),   'rawtags': _('Tags:'), 'transplant': _('Transplant:'), - 'p4': _('Perforce:'), 'svn': _('Subversion:')} + 'p4': _('Perforce:'), 'svn': _('Subversion:'), + 'shortuser': _('User:')}     def __init__(self):   pass @@ -230,6 +231,8 @@
  return hglib.toutf(hglib.tounicode(value)[:80])   elif item == 'user':   return hglib.toutf(ctx.user()) + elif item == 'shortuser': + return hglib.toutf(hglib.username(ctx.user()))   elif item == 'dateage':   date = self.get_data('date', *args)   age = self.get_data('age', *args) @@ -352,7 +355,8 @@
  opts = dict(color='black', background=gtklib.PYELLOW)   tags = [gtklib.markup(' %s ' % tag, **opts) for tag in value]   return ' '.join(tags) - elif item in ('desc', 'summary', 'user', 'date', 'age'): + elif item in ('desc', 'summary', 'user', 'shortuser', + 'date', 'age'):   return gtklib.markup(value)   elif item == 'dateage':   return gtklib.markup('%s (%s)' % value)