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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 01 Feb 2014 16:35:17 +0100
changeset 3247
ed79e48ba0b4
parent 3246
4cd58a0d6c28
child 3249
8f22bfa586b1

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

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 16:29:24 2014 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgLogBrowserDialog.py	Sat Feb 01 16:35:17 2014 +0100
@@ -725,7 +725,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:
@@ -748,18 +748,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.tr('Process Generation Error'),
-                    self.tr(
-                        '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.tr('Process Generation Error'),
+                        self.tr(
+                            '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 16:29:24 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.tr('Process Generation Error'),
-                    self.tr(
-                        '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.tr('Process Generation Error'),
+                        self.tr(
+                            '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