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: move 'dateage' to csinfo's preset data

Changeset 421c2cf5fa5c

Parent d9b4ffce954a

by Yuki KODAMA

Changes to 2 files · Browse files at 421c2cf5fa5c Showing diff from parent d9b4ffce954a Diff from another changeset...

 
444
445
446
447
448
449
450
451
452
453
454
455
 
472
473
474
475
476
477
478
479
 
504
505
506
507
508
509
510
511
 
518
519
520
521
 
522
523
524
 
444
445
446
 
 
 
 
 
 
447
448
449
 
466
467
468
 
 
469
470
471
 
496
497
498
 
 
499
500
501
 
508
509
510
 
511
512
513
514
@@ -444,12 +444,6 @@
  elif item == 'branch':   value = hglib.toutf(ctx.branch())   return value != 'default' and value or None - elif item == 'dateage': - date = widget.get_data('date') - age = widget.get_data('age') - if date is not None and age is not None: - return (date, age) - return None   elif item == 'parents':   return [revline_data(ctx) for ctx in ctx.parents()]   elif item == 'children': @@ -472,8 +466,6 @@
  def label_func(widget, item):   if item == 'cset':   return _('Changeset:') - elif item == 'dateage': - return _('Date:')   elif item == 'parents':   return _('Parent:')   elif item == 'children': @@ -504,8 +496,6 @@
  else:   csets.append(revline_markup(*cset))   return csets - elif item == 'dateage': - return gtklib.markup('%s (%s)' % value)   raise csinfo.UnknownItem(item)     custom = csinfo.custom(data=data_func, label=label_func, @@ -518,7 +508,7 @@
  selectable=True)   self.summarypanel = csinfo.create(self.repo, custom=custom)   - # summary box (summarypanel + separator) + ## summary box (summarypanel + separator)   self.summarybox = gtk.VBox()   details_box.pack_start(self.summarybox, False, False)   self.summarybox.pack_start(self.summarypanel, False, False)
 
20
21
22
23
 
24
25
26
 
190
191
192
193
194
195
196
 
 
 
 
197
198
199
 
221
222
223
 
 
 
 
 
 
224
225
226
 
324
325
326
 
 
327
328
329
 
20
21
22
 
23
24
25
26
 
190
191
192
 
 
 
 
193
194
195
196
197
198
199
 
221
222
223
224
225
226
227
228
229
230
231
232
 
330
331
332
333
334
335
336
337
@@ -20,7 +20,7 @@
   from tortoisehg.hgtk import gtklib   -PANEL_DEFAULT = ('rev', 'summary', 'user', 'date', 'branch', 'tags', 'transplant') +PANEL_DEFAULT = ('rev', 'summary', 'user', 'dateage', 'branch', 'tags', 'transplant')    def create(repo, target=None, style=None, custom=None, **kargs):   return Factory(repo, custom, style, target, **kargs)() @@ -190,10 +190,10 @@
    LABELS = {'rev': _('Revision:'), 'revnum': _('Revision:'),   'revid': _('Revision:'), 'summary': _('Summary:'), - 'user': _('User:'), 'age': _('Age:'), 'date': _('Date:'), - 'branch': _('Branch:'), 'tags': _('Tags:'), - 'rawbranch': _('Branch:'), 'rawtags': _('Tags:'), - 'transplant': _('Transplant:')} + 'user': _('User:'), 'date': _('Date:'),'age': _('Age:'), + 'dateage': _('Date'), 'branch': _('Branch:'), + 'tags': _('Tags:'), 'rawbranch': _('Branch:'), + 'rawtags': _('Tags:'), 'transplant': _('Transplant:')}     def __init__(self):   pass @@ -221,6 +221,12 @@
  return value   elif item == 'user':   return hglib.toutf(ctx.user()) + elif item == 'dateage': + date = self.get_data('date', *args) + age = self.get_data('age', *args) + if date and age: + return (date, age) + return None   elif item == 'date':   date = ctx.date()   if date: @@ -324,6 +330,8 @@
  return ' '.join(tags)   elif item in ('desc', 'summary', 'user', 'date', 'age'):   return gtklib.markup(value) + elif item == 'dateage': + return gtklib.markup('%s (%s)' % value)   raise UnknownItem(item)   value = self.get_data(item, *args)   if value is None: