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

datamine: add zoom-to-change feature for annotate pane

Changeset afebc08f5aec

Parent f45259c9e39d

by Steve Borho

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

Change 1 of 6 Show Entire File hggtk/​datamine.py Stacked
 
42
43
44
45
 
 
46
47
48
 
 
49
50
51
 
66
67
68
69
70
71
72
73
74
75
76
77
78
79
 
118
119
120
121
 
122
 
123
124
125
 
126
127
128
 
132
133
134
 
 
 
 
 
135
136
137
 
546
547
548
549
 
550
551
552
 
618
619
620
621
 
622
623
624
 
42
43
44
 
45
46
47
48
 
49
50
51
52
53
 
68
69
70
 
71
72
73
74
75
76
 
77
78
79
 
118
119
120
 
121
122
123
124
125
 
126
127
128
129
 
133
134
135
136
137
138
139
140
141
142
143
 
552
553
554
 
555
556
557
558
 
624
625
626
 
627
628
629
630
@@ -42,10 +42,12 @@
    def get_tbbuttons(self):   self.stop_button = self.make_toolbutton(gtk.STOCK_STOP, _('Stop'), - self._stop_current_search, tip=_('Stop operation on current tab')) + self._stop_current_search, + tip=_('Stop operation on current tab'))   return [   self.make_toolbutton(gtk.STOCK_FIND, _('New Search'), - self._search_clicked, tip=_('Open new search tab')), + self._search_clicked, + tip=_('Open new search tab')),   self.stop_button   ]   @@ -66,14 +68,12 @@
    def save_settings(self):   settings = gdialog.GDialog.save_settings(self) - settings['datamine'] = ()   return settings     def load_settings(self, settings):   gdialog.GDialog.load_settings(self, settings)   self.connect('thg-close', self._close_current_page)   self.tabwidth = gettabwidth(self.ui) - # settings['datamine']     def get_body(self):   """ Initialize the Dialog. """ @@ -118,11 +118,12 @@
  _menu.show_all()   return _menu   - def annotate_context_menu(self, opts): + def annotate_context_menu(self, objs):   _menu = gtk.Menu() + _menu.append(create_menu(_('_zoom to change'), self._cmenu_zoom, objs))   _menu.append(create_menu(_('di_splay change'), self._cmenu_display))   _menu.append(create_menu(_('_annotate parent'), - self._annotate_parent, opts)) + self._annotate_parent, objs))   _menu.show_all()   return _menu   @@ -132,6 +133,11 @@
  parent = self.repo[self.currev].parents()[0].rev()   self.trigger_annotate(parent, objs)   + def _cmenu_zoom(self, menuitem, objs): + (frame, model, path, graphview) = objs + graphview.scroll_to_revision(int(self.currev)) + graphview.set_revision_id(int(self.currev)) +   def _cmenu_display(self, menuitem):   statopts = {'rev' : [self.currev] }   dialog = changeset.ChangeSet(self.ui, self.repo, self.cwd, [], statopts) @@ -546,7 +552,7 @@
  graphview.connect('revision-selected', self.log_selection_changed,   path, followlabel, follow)   - objs = (frame, treeview.get_model(), path) + objs = (frame, treeview.get_model(), path, graphview)   graphview.treeview.connect('row-activated', self.log_activate, objs)   graphview.treeview.connect('button-release-event',   self._ann_button_release, objs) @@ -618,7 +624,7 @@
  background thread to perform the annotation. Disable the select   button until this operation is complete.   ''' - (frame, model, path) = objs + (frame, model, path, graphview) = objs   q = Queue.Queue()   args = [self.repo.root, q, 'annotate', '--follow', '--number',   '--rev', str(rev), path]