Commits

Yuya Nishihara committed 84b731c

fix incdec

Comments (0)

Files changed (1)

update-useagent.diff

 # HG changeset patch
 # Date 1376809671 -32400
-# Parent 7e9a648c882750c7e2682e39dedb0c436e4637a2
+# Parent 394f5d2e48658545a793638c31cde3876b279b7f
 update: use RepoAgent to run Mercurial commands
 
 TODO: not tested well
  
          if self.discard_chk.isChecked():
              cmdline.append('--clean')
+@@ -139,7 +139,6 @@ class rUpdateDialog(UpdateDialog):
+         cmdline.append(revHash)
+ 
+         # start updating
+-        self.repo.incrementBusyCount()
+         self.cmd.run(cmdline)
+ 
+     ### Signal Handlers ###
 diff --git a/tortoisehg/hgqt/update.py b/tortoisehg/hgqt/update.py
 --- a/tortoisehg/hgqt/update.py
 +++ b/tortoisehg/hgqt/update.py
          if self.verbose_chk.isChecked():
              cmdline += ['--verbose']
          cmdline += ['--config', 'ui.merge=internal:' +
-@@ -285,7 +281,7 @@ class UpdateDialog(QDialog):
+@@ -285,11 +281,10 @@ class UpdateDialog(QDialog):
                          _('Do you really want to deactivate the <i>%s</i> '
                          'bookmark?') % self.repo._bookmarkcurrent)
                      if deactivatebookmark:
                          if self.verbose_chk.isChecked():
                              cmdline += ['--verbose']
                          cmdline += ['-i', self.repo._bookmarkcurrent]
+-                        self.repo.incrementBusyCount()
+                         self.cmd.run(cmdline)
+                     return
+ 
+@@ -385,7 +380,6 @@ class UpdateDialog(QDialog):
+                     return
+ 
+         # start updating
+-        self.repo.incrementBusyCount()
+         self.cmd.run(cmdline)
+ 
+     ### Signal Handlers ###
+@@ -412,7 +406,6 @@ class UpdateDialog(QDialog):
+         self.detail_btn.setShown(True)
+ 
+     def command_finished(self, ret):
+-        self.repo.decrementBusyCount()
+         if ret not in (0, 1) or self.cmd.outputShown():
+             self.detail_btn.setChecked(True)
+             self.close_btn.setShown(True)