Fix for the Mercurial log dialogs for checking incoming changes when there are none. 5_4_x

Sat, 01 Feb 2014 16:35:17 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 01 Feb 2014 16:35:17 +0100
branch
5_4_x
changeset 3248
38d32752025c
parent 3245
48311fa7c52c
child 3252
8dfa2a7e936d

Fix for the Mercurial log dialogs for checking incoming changes when there are none.
(grafted from ed79e48ba0b4a5568afb9cee21e4ba16a0c41740)

Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsMercurial/HgLogDialog.py file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sat Feb 01 15:49:04 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sat Feb 01 16:35:17 2014 +0100
@@ -706,7 +706,7 @@
                 err = ""
             if err:
                 self.__showError(err)
-            else:
+            elif os.path.exists(self.vcs.bundleFile):
                 out, err = self.__hgClient.runcommand(args)
                 self.buf = out.splitlines(True)
                 if err:
@@ -729,18 +729,21 @@
                 if procStarted:
                     process.waitForFinished(30000)
             
-            self.process.start('hg', args)
-            procStarted = self.process.waitForStarted(5000)
-            if not procStarted:
-                self.inputGroup.setEnabled(False)
-                self.inputGroup.hide()
-                E5MessageBox.critical(
-                    self,
-                    self.trUtf8('Process Generation Error'),
-                    self.trUtf8(
-                        'The process {0} could not be started. '
-                        'Ensure, that it is in the search path.'
-                    ).format('hg'))
+            if os.path.exists(self.vcs.bundleFile):
+                self.process.start('hg', args)
+                procStarted = self.process.waitForStarted(5000)
+                if not procStarted:
+                    self.inputGroup.setEnabled(False)
+                    self.inputGroup.hide()
+                    E5MessageBox.critical(
+                        self,
+                        self.trUtf8('Process Generation Error'),
+                        self.trUtf8(
+                            'The process {0} could not be started. '
+                            'Ensure, that it is in the search path.'
+                        ).format('hg'))
+            else:
+                self.__finish()
     
     def start(self, fn):
         """
--- a/Plugins/VcsPlugins/vcsMercurial/HgLogDialog.py	Sat Feb 01 15:49:04 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgLogDialog.py	Sat Feb 01 16:35:17 2014 +0100
@@ -179,7 +179,7 @@
                 err = ""
             if err:
                 self.__showError(err)
-            else:
+            elif os.path.exists(self.vcs.bundleFile):
                 out, err = self.__hgClient.runcommand(args)
                 if err:
                     self.__showError(err)
@@ -202,18 +202,21 @@
                 if procStarted:
                     process.waitForFinished(30000)
             
-            self.process.start('hg', args)
-            procStarted = self.process.waitForStarted(5000)
-            if not procStarted:
-                self.inputGroup.setEnabled(False)
-                self.inputGroup.hide()
-                E5MessageBox.critical(
-                    self,
-                    self.trUtf8('Process Generation Error'),
-                    self.trUtf8(
-                        'The process {0} could not be started. '
-                        'Ensure, that it is in the search path.'
-                    ).format('hg'))
+            if os.path.exists(self.vcs.bundleFile):
+                self.process.start('hg', args)
+                procStarted = self.process.waitForStarted(5000)
+                if not procStarted:
+                    self.inputGroup.setEnabled(False)
+                    self.inputGroup.hide()
+                    E5MessageBox.critical(
+                        self,
+                        self.trUtf8('Process Generation Error'),
+                        self.trUtf8(
+                            'The process {0} could not be started. '
+                            'Ensure, that it is in the search path.'
+                        ).format('hg'))
+            else:
+                self.__finish()
     
     def __getParents(self, rev):
         """

eric ide

mercurial