Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

sync: disable thgrepo poll while commands run

Also reordered functions to place the cmd.Widget use
all in one place.

Changeset 255b7e7a4c48

Parent ba5ca67ffb9a

by Steve Borho

Changes to one file · Browse files at 255b7e7a4c48 Showing diff from parent ba5ca67ffb9a Diff from another changeset...

 
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
 
415
416
417
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418
419
420
 
432
433
434
 
435
436
437
 
216
217
218
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
219
220
221
 
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
 
433
434
435
436
437
438
439
@@ -216,28 +216,6 @@
  self.setUrl(self.paths['default'])   self.curalias = 'default'   - def commandStarted(self): - for b in self.opbuttons: - if b: b.setEnabled(False) - if not self.embedded: - self.cmd.show_output(True) - self.cmd.setVisible(True) - - def commandFinished(self, wrapper): - for b in self.opbuttons: - if b: b.setEnabled(True) - if self.finishfunc: - output = self.cmd.core.get_rawoutput() - if wrapper.data is None: - # An exception ocurred, command did not finish - self.finishfunc(-1, output) - else: - self.finishfunc(wrapper.data, output) - - def commandCanceled(self): - for b in self.opbuttons: - if b: b.setEnabled(True) -   def configChanged(self):   'Repository is reporting its config files have changed'   self.reload() @@ -415,6 +393,29 @@
  if dlg.exec_() == QDialog.Accepted:   self.curuser, self.curpw = '', ''   + def commandStarted(self): + for b in self.opbuttons: + if b: b.setEnabled(False) + if not self.embedded: + self.cmd.show_output(True) + self.cmd.setVisible(True) + + def commandFinished(self, wrapper): + self.repo.decrementBusyCount() + for b in self.opbuttons: + if b: b.setEnabled(True) + if self.finishfunc: + output = self.cmd.core.get_rawoutput() + if wrapper.data is None: + # An exception ocurred, command did not finish + self.finishfunc(-1, output) + else: + self.finishfunc(wrapper.data, output) + + def commandCanceled(self): + for b in self.opbuttons: + if b: b.setEnabled(True) +   def run(self, cmdline, details):   if self.cmd.core.is_running():   return @@ -432,6 +433,7 @@
  safeurl = self.currentUrl(True)   display = ' '.join(cmdline + [safeurl]).replace('\n', '^M')   cmdline.append(url) + self.repo.incrementBusyCount()   self.cmd.run(cmdline, display=display)     ##