Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

stable csinfo: add 'age' data item

Changeset 745e32dfd6e2

Parent 45cf688c6bad

by Yuki KODAMA

Changes to one file · Browse files at 745e32dfd6e2 Showing diff from parent 45cf688c6bad Diff from another changeset...

 
115
116
117
118
 
119
120
121
 
145
146
147
 
 
148
149
150
 
218
219
220
221
 
222
223
224
 
115
116
117
 
118
119
120
121
 
145
146
147
148
149
150
151
152
 
220
221
222
 
223
224
225
226
@@ -115,7 +115,7 @@
 class ChangesetInfo(object):     LABELS = {'rev': _('rev:'), 'revnum': _('rev:'), 'revid': _('rev:'), - 'summary': _('summary:'), 'user': _('user:'), + 'summary': _('summary:'), 'user': _('user:'), 'age': _('age:'),   'date': _('date:'), 'branch': _('branch:'), 'tags': _('tags:'),   'rawbranch': _('branch:'), 'rawtags': _('tags:')}   @@ -145,6 +145,8 @@
  return hglib.toutf(ctx.user())   elif item == 'date':   return hglib.displaytime(ctx.date()) + elif item == 'age': + return hglib.age(ctx.date())   elif item == 'rawbranch':   if ctx.node() in repo.branchtags().values():   return hglib.toutf(ctx.branch()) @@ -218,7 +220,7 @@
  opts = dict(color='black', background='#ffffaa')   tags = [gtklib.markup(' %s ' % tag, **opts) for tag in value]   return ' '.join(tags) - elif item in ('summary', 'user', 'date'): + elif item in ('summary', 'user', 'date', 'age'):   return gtklib.markup(value)   raise UnknownItem(item)   value = self.get_data(item, widget, rev, custom, repo)