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

history: explicit ready flag to prevent startup races

Changeset 4249c27c4677

Parent 5a8b11497fc9

by Steve Borho

Changes to one file · Browse files at 4249c27c4677 Showing diff from parent 5a8b11497fc9 Diff from another changeset...

Change 1 of 6 Show Entire File hggtk/​history.py Stacked
 
38
39
40
 
41
42
43
 
113
114
115
 
 
116
117
118
 
207
208
209
210
 
211
212
213
 
221
222
223
 
224
225
226
 
308
309
310
311
312
313
314
315
316
317
318
319
 
489
490
491
492
493
 
 
494
495
496
 
497
498
499
500
501
 
502
503
504
 
38
39
40
41
42
43
44
 
114
115
116
117
118
119
120
121
 
210
211
212
 
213
214
215
216
 
224
225
226
227
228
229
230
 
312
313
314
 
 
 
 
 
 
315
316
317
 
487
488
489
 
 
490
491
492
493
 
494
495
496
497
498
 
499
500
501
502
@@ -38,6 +38,7 @@
  self.currow = None   self.curfile = None   self.origtip = len(self.repo) + self.ready = False     def get_title(self):   return hglib.toutf(os.path.basename(self.repo.root)) + ' log' @@ -113,6 +114,8 @@
  def toggle_view_column(self, button, property):   active = button.get_active()   self.graphview.set_property(property, active) + if property in ('branch-color') and self.ready: + self.reload_log()     def more_clicked(self, button, data=None):   self.graphview.next_revision_batch(self.limit) @@ -207,7 +210,7 @@
  button.set_draw_as_radio(True)   menu.append(button)   button = gtk.CheckMenuItem(_('Color by Branch')) - button.connect('toggled', self._branch_color, + button.connect('toggled', self.toggle_view_column,   'branch-color')   button.set_active(self.branch_color)   button.set_draw_as_radio(True) @@ -221,6 +224,7 @@
    def prepare_display(self):   'Called at end of display() method' + self.ready = True   self.opts['rev'] = [] # This option is dangerous - used directly by hg   self.opts['revs'] = None   os.chdir(self.repo.root) # for paths relative to repo root @@ -308,12 +312,6 @@
  if self.graphview.model:   self.graphview.model.refresh()   - def _branch_color(self, button, property): - active = button.get_active() - self.graphview.set_property(property, active) - if hasattr(self, 'nextbutton'): - self.reload_log() -   def reload_log(self, **filteropts):   'Send refresh event to treeview object'   os.chdir(self.repo.root) # for paths relative to repo root @@ -489,16 +487,16 @@
  self.custombutton.set_sensitive(False)   filterbox.pack_start(self.custombutton, False)   - self.colmenu = gtk.MenuToolButton('') - self.colmenu.set_menu(self.view_menu()) + colmenu = gtk.MenuToolButton('') + colmenu.set_menu(self.view_menu())   # A MenuToolButton has two parts; a Button and a ToggleButton   # we want to see the togglebutton, but not the button - b = self.colmenu.child.get_children()[0] + b = colmenu.child.get_children()[0]   b.unmap()   b.set_sensitive(False)     filterbox.pack_start(gtk.Label(''), True, True) # expanding blank label - filterbox.pack_start(self.colmenu, False, False) + filterbox.pack_start(colmenu, False, False)     vbox = gtk.VBox()   vbox.pack_start(filterbox, False, False, 0)