Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

datamine: return to original line after annotate

Changeset be96f021c026

Parent afebc08f5aec

by Steve Borho

Changes to one file · Browse files at be96f021c026 Showing diff from parent afebc08f5aec Diff from another changeset...

Change 1 of 6 Show Entire File hggtk/​datamine.py Stacked
 
134
135
136
137
 
138
139
140
 
552
553
554
555
 
556
557
558
 
624
625
626
627
 
628
629
630
 
642
643
644
 
645
646
647
 
655
656
657
658
659
 
 
660
661
 
662
663
664
 
665
666
667
 
682
683
684
 
 
 
685
686
687
 
134
135
136
 
137
138
139
140
 
552
553
554
 
555
556
557
558
 
624
625
626
 
627
628
629
630
 
642
643
644
645
646
647
648
 
656
657
658
 
 
659
660
661
 
662
663
664
665
666
667
668
669
 
684
685
686
687
688
689
690
691
692
@@ -134,7 +134,7 @@
  self.trigger_annotate(parent, objs)     def _cmenu_zoom(self, menuitem, objs): - (frame, model, path, graphview) = objs + (frame, treeview, path, graphview) = objs   graphview.scroll_to_revision(int(self.currev))   graphview.set_revision_id(int(self.currev))   @@ -552,7 +552,7 @@
  graphview.connect('revision-selected', self.log_selection_changed,   path, followlabel, follow)   - objs = (frame, treeview.get_model(), path, graphview) + objs = (frame, treeview, path, graphview)   graphview.treeview.connect('row-activated', self.log_activate, objs)   graphview.treeview.connect('button-release-event',   self._ann_button_release, objs) @@ -624,7 +624,7 @@
  background thread to perform the annotation. Disable the select   button until this operation is complete.   ''' - (frame, model, path, graphview) = objs + (frame, treeview, path, graphview) = objs   q = Queue.Queue()   args = [self.repo.root, q, 'annotate', '--follow', '--number',   '--rev', str(rev), path] @@ -642,6 +642,7 @@
  agedays = (curdate - basedate) / (24 * 60 * 60)   colormap = AnnotateColorSaturation(agedays)   + model, rows = treeview.get_selection().get_selected_rows()   model.clear()   self.stbar.begin()   self.stbar.set_status_text(toutf('hg ' + ' '.join(args[2:]))) @@ -655,13 +656,14 @@
  hbox.show_all()   self.notebook.set_tab_label(frame, hbox)   - gobject.timeout_add(50, self.annotate_wait, thread, q, model, - curdate, colormap, frame) + gobject.timeout_add(50, self.annotate_wait, thread, q, treeview, + curdate, colormap, frame, rows)   - def annotate_wait(self, thread, q, model, curdate, colormap, frame): + def annotate_wait(self, thread, q, tview, curdate, colormap, frame, rows):   """   Handle all the messages currently in the queue (if any).   """ + model = tview.get_model()   while q.qsize():   line = q.get(0).rstrip('\r\n')   try: @@ -682,6 +684,9 @@
  else:   if threading.activeCount() == 1:   self.stop_button.set_sensitive(False) + if rows: + tview.get_selection().select_path(rows[0]) + tview.grab_focus()   frame._mythread = None   self.stbar.end()   return False