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

sync: move busy count manipulations closer to config file writes

Changeset bd842d036b1b

Parent c611afcda895

by Steve Borho

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

 
285
286
287
288
289
 
290
291
292
293
294
295
296
297
298
 
299
300
301
 
352
353
354
355
356
357
358
359
360
 
460
461
462
 
463
464
465
466
467
468
 
469
470
471
472
473
474
475
 
476
477
 
 
478
479
480
 
517
518
519
 
520
521
522
523
524
 
525
526
527
528
529
530
531
 
532
533
 
 
534
535
536
 
623
624
625
 
626
627
628
629
630
 
631
632
633
 
285
286
287
 
 
288
289
290
 
291
292
293
294
295
 
296
297
298
299
 
350
351
352
 
353
 
354
355
356
 
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
 
473
474
 
475
476
477
478
479
 
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
 
532
533
 
534
535
536
537
538
 
625
626
627
628
629
630
631
632
633
634
635
636
637
@@ -285,17 +285,15 @@
  else:   alias = 'new'   url = hglib.fromunicode(self.urlentry.text()) - self.repo.incrementBusyCount() - dialog = SaveDialog(self.root, alias, url, self) + dialog = SaveDialog(self.repo, alias, url, self)   if dialog.exec_() == QDialog.Accepted:   self.curalias = hglib.fromunicode(dialog.aliasentry.text()) - self.repo.decrementBusyCount()     def authclicked(self):   host = hglib.fromunicode(self.hostentry.text())   user = self.curuser or ''   pw = self.curpw or '' - dialog = AuthDialog(self.root, host, user, pw, self) + dialog = AuthDialog(self.repo, host, user, pw, self)   if dialog.exec_() == QDialog.Accepted:   self.curuser, self.curpw = '', ''   @@ -352,9 +350,7 @@
    def postpullclicked(self):   dlg = PostPullDialog(self.repo, self) - self.repo.incrementBusyCount()   dlg.exec_() - self.repo.decrementBusyCount()     def emailclicked(self):   from tortoisehg.hgqt import run as _run @@ -460,21 +456,24 @@
  return   if fn is None:   return + self.repo.incrementBusyCount()   try:   cfg.set('tortoisehg', 'postpull', self.getValue())   wconfig.writefile(cfg, fn)   except IOError, e:   qtlib.WarningMsgBox(_('Unable to write configuration file'),   hglib.tounicode(e), parent=self) + self.repo.decrementBusyCount()   super(PostPullDialog, self).accept()     def reject(self):   super(PostPullDialog, self).reject()    class SaveDialog(QDialog): - def __init__(self, root, alias, url, parent): + def __init__(self, repo, alias, url, parent):   super(SaveDialog, self).__init__(parent) - self.root = root + self.repo = repo + self.root = repo.root   layout = QVBoxLayout()   self.setLayout(layout)   hbox = QHBoxLayout() @@ -517,20 +516,23 @@
  _('%s already exists, replace URL?') % alias):   return   cfg.set('paths', alias, path) + self.repo.incrementBusyCount()   try:   wconfig.writefile(cfg, fn)   except IOError, e:   qtlib.WarningMsgBox(_('Unable to write configuration file'),   hglib.tounicode(e), parent=self) + self.repo.decrementBusyCount()   super(SaveDialog, self).accept()     def reject(self):   super(SaveDialog, self).reject()    class AuthDialog(QDialog): - def __init__(self, root, host, user, pw, parent): + def __init__(self, repo, host, user, pw, parent):   super(AuthDialog, self).__init__(parent) - self.root = root + self.repo = repo + self.root = repo.root   layout = QVBoxLayout()   self.setLayout(layout)   @@ -623,11 +625,13 @@
  cfg.set('auth', key, password)   elif not password and key in cfg['auth']:   del cfg['auth'][key] + self.repo.incrementBusyCount()   try:   wconfig.writefile(cfg, fn)   except IOError, e:   qtlib.WarningMsgBox(_('Unable to write configuration file'),   hglib.tounicode(e), parent=self) + self.repo.decrementBusyCount()   super(AuthDialog, self).accept()     def reject(self):