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

datamine: use csinfo to show info of selected revision

Changeset 7393e9edfcd8

Parent 428e88a2cdd2

by Yuki KODAMA

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

 
22
23
24
25
 
26
27
28
29
30
31
32
 
 
33
34
35
36
37
38
39
40
41
42
 
 
 
 
 
43
44
45
 
101
102
103
 
 
104
105
106
 
113
114
115
 
 
 
 
 
 
116
117
118
 
 
 
119
120
121
 
258
259
260
261
262
263
 
 
 
264
265
266
 
355
356
357
358
359
360
361
 
375
376
377
378
 
379
380
381
 
490
491
492
493
 
494
495
496
497
 
 
498
499
500
 
516
517
518
519
 
520
521
522
 
629
630
631
632
633
634
635
 
660
661
662
663
 
664
665
666
 
808
809
810
811
 
812
813
814
815
816
 
817
818
819
 
839
840
841
842
 
843
844
845
 
22
23
24
 
25
26
27
28
29
 
 
 
30
31
32
33
34
35
 
 
 
 
 
 
36
37
38
39
40
41
42
43
 
99
100
101
102
103
104
105
106
 
113
114
115
116
117
118
119
120
121
122
 
 
123
124
125
126
127
128
 
265
266
267
 
 
 
268
269
270
271
272
273
 
362
363
364
 
365
366
367
 
381
382
383
 
384
385
386
387
 
496
497
498
 
499
500
501
 
 
502
503
504
505
506
 
522
523
524
 
525
526
527
528
 
635
636
637
 
638
639
640
 
665
666
667
 
668
669
670
671
 
813
814
815
 
816
817
818
819
820
 
821
822
823
824
 
844
845
846
 
847
848
849
850
@@ -22,24 +22,22 @@
 from tortoisehg.hgtk.logview.colormap import AnnotateColorSaturation  from tortoisehg.hgtk.logview.treeview import TreeView as LogTreeView  from tortoisehg.hgtk.logview import treemodel as LogTreeModelModule -from tortoisehg.hgtk import gtklib, gdialog, changeset, statusbar +from tortoisehg.hgtk import gtklib, gdialog, changeset, statusbar, csinfo    # Column indexes for grep  GCOL_REVID = 0  GCOL_LINE = 1 # matched line -GCOL_EDESC = 2 # escaped summary -GCOL_DESC = 3 # summary -GCOL_PATH = 4 +GCOL_DESC = 2 # utf-8, escaped summary +GCOL_PATH = 3    # Column indexes for annotation  ACOL_REVID = 0  ACOL_LINE = 1 # file line -ACOL_EDESC = 2 # escaped summary -ACOL_DESC = 3 # summary -ACOL_PATH = 4 -ACOL_COLOR = 5 -ACOL_USER = 6 -ACOL_LNUM = 7 # line number +ACOL_DESC = 2 # utf-8, escaped summary +ACOL_PATH = 3 +ACOL_COLOR = 4 +ACOL_USER = 5 +ACOL_LNUM = 6 # line number    class DataMineDialog(gdialog.GWindow):   @@ -101,6 +99,8 @@
  self.notebook = notebook   vbox.pack_start(self.notebook, True, True, 2)   + self.stop_button.set_sensitive(False) +   accelgroup = gtk.AccelGroup()   self.add_accel_group(accelgroup)   mod = gtklib.get_thg_modifier() @@ -113,9 +113,16 @@
  modifier, gtk.ACCEL_VISIBLE)   notebook.connect('thg-new', self.new_notebook)   + # status bar + hbox = gtk.HBox() + style = csinfo.labelstyle(contents=('%(shortuser)s@%(revnum)s ' + '%(dateage)s "%(summary)s"',), selectable=True) + self.cslabel = csinfo.create(self.repo, style=style) + hbox.pack_start(self.cslabel, False, False, 4)   self.stbar = statusbar.StatusBar() - vbox.pack_start(self.stbar, False, False, 2) - self.stop_button.set_sensitive(False) + hbox.pack_start(self.stbar) + vbox.pack_start(hbox, False, False) +   return vbox     def _destroying(self, gtkobj): @@ -258,9 +265,9 @@
  text = hglib.tounicode(ctx.description()).replace(u'\0', '')   lines = text.splitlines()   summary = hglib.toutf(lines and lines[0] or '') - desc = '%s@%s %s "%s"' % (author, rev, date, summary) - desc_esc = gtklib.markup_escape_text(desc) - self.changedesc[rev] = (desc, desc_esc, author) + desc = gtklib.markup_escape_text('%s@%s %s "%s"' % \ + (author, rev, date, summary)) + self.changedesc[rev] = (desc, author)   return self.changedesc[rev]     def search_clicked(self, button, data): @@ -355,7 +362,6 @@
  results = gtk.ListStore(str, # revision id   str, # matched line (utf-8)   str, # description (utf-8, escaped) - str, # description (utf-8)   str) # file path (utf-8)   treeview.set_model(results)   treeview.set_search_equal_func(self.search_in_grep) @@ -375,7 +381,7 @@
  column.add_attribute(cell, 'text', col)   treeview.append_column(column)   if hasattr(treeview, 'set_tooltip_column'): - treeview.set_tooltip_column(GCOL_EDESC) + treeview.set_tooltip_column(GCOL_DESC)   scroller = gtk.ScrolledWindow()   scroller.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)   scroller.add(treeview) @@ -490,11 +496,11 @@
  (path, revid, text) = line.split(':', 2)   except ValueError:   continue - desc, desc_esc, user = self.get_rev_desc(long(revid)) + desc, user = self.get_rev_desc(long(revid))   if self.tabwidth:   text = text.expandtabs(self.tabwidth) - model.append((revid, hglib.toutf(text[:512]), desc_esc, - desc, hglib.toutf(path))) + model.append((revid, hglib.toutf(text[:512]), desc, + hglib.toutf(path)))   if thread.isAlive():   return True   else: @@ -516,7 +522,7 @@
  iter = model.get_iter(path)   self.currev = model[iter][GCOL_REVID]   self.curpath = hglib.fromutf(model[iter][GCOL_PATH]) - self.stbar.set_text(model[iter][GCOL_DESC]) + self.cslabel.update(model[iter][GCOL_REVID])     def close_current_page(self):   num = self.notebook.get_current_page() @@ -629,7 +635,6 @@
  results = gtk.ListStore(str, # revision id   str, # file line (utf-8)   str, # description (utf-8, escaped) - str, # description (utf-8)   str, # file path (utf-8)   str, # color   str, # author (utf-8) @@ -660,7 +665,7 @@
  self.add_header_context_menu(column, context_menu)   treeview.set_headers_clickable(True)   if hasattr(treeview, 'set_tooltip_column'): - treeview.set_tooltip_column(ACOL_EDESC) + treeview.set_tooltip_column(ACOL_DESC)   results.path = path   results.rev = revid   scroller = gtk.ScrolledWindow() @@ -808,12 +813,12 @@
  rowrev = long(revid)   except ValueError:   continue - desc, desc_esc, user = self.get_rev_desc(rowrev) + desc, user = self.get_rev_desc(rowrev)   ctx = self.repo[rowrev]   color = colormap.get_color(ctx, curdate)   if self.tabwidth:   text = text.expandtabs(self.tabwidth) - model.append((revid, hglib.toutf(text[:512]), desc_esc, desc, + model.append((revid, hglib.toutf(text[:512]), desc,   hglib.toutf(path.strip()), color, user, len(model)+1))   if thread.isAlive():   return True @@ -839,7 +844,7 @@
  anniter = model.get_iter(path)   self.currev = model[anniter][ACOL_REVID]   self.path = model.path - self.stbar.set_text(model[anniter][ACOL_DESC]) + self.cslabel.update(model[anniter][ACOL_REVID])     def ann_button_release(self, widget, event, objs):   if event.button == 3 and not (event.state & (gtk.gdk.SHIFT_MASK |