Fixed a little issue in the Subversion plug-in detecting additions and deletions in the update operation. 5_2_x

Sat, 30 Jun 2012 14:17:27 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 30 Jun 2012 14:17:27 +0200
branch
5_2_x
changeset 1921
e7ee88a17118
parent 1916
8f3877772931
child 1922
2b69354a9f97

Fixed a little issue in the Subversion plug-in detecting additions and deletions in the update operation.

Plugins/VcsPlugins/vcsSubversion/SvnDialog.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/subversion.py file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsSubversion/SvnDialog.py	Wed Jun 27 19:44:39 2012 +0200
+++ b/Plugins/VcsPlugins/vcsSubversion/SvnDialog.py	Sat Jun 30 14:17:27 2012 +0200
@@ -9,7 +9,7 @@
 
 import os
 
-from PyQt4.QtCore import QTimer, QProcess, pyqtSlot
+from PyQt4.QtCore import QTimer, QProcess, pyqtSlot, QProcessEnvironment
 from PyQt4.QtGui import QLineEdit, QDialog, QDialogButtonBox
 
 from E5Gui import E5MessageBox
@@ -90,12 +90,13 @@
         self.normal = (exitStatus == QProcess.NormalExit) and (exitCode == 0)
         self.__finish()
         
-    def startProcess(self, args, workingDir=None):
+    def startProcess(self, args, workingDir=None, setLanguage=False):
         """
         Public slot used to start the process.
         
         @param args list of arguments for the process (list of strings)
         @param workingDir working directory for the process (string)
+        @param setLanguage flag indicating to set the language to "C" (boolean)
         @return flag indicating a successful start of the process
         """
         self.errorGroup.hide()
@@ -105,6 +106,10 @@
         self.__hasAddOrDelete = False
         
         self.proc = QProcess()
+        if setLanguage:
+            env = QProcessEnvironment.systemEnvironment()
+            env.insert("LANG", "C")
+            self.proc.setProcessEnvironment(env)
         nargs = []
         lastWasPwd = False
         for arg in args:
@@ -167,7 +172,7 @@
                     if '.e4p' in l:
                         self.__hasAddOrDelete = True
                         break
-                    if l and l[0].strip() in ['A', 'D']:
+                    if l and l[0:2].strip() in ['A', 'D']:
                         self.__hasAddOrDelete = True
                         break
         
--- a/Plugins/VcsPlugins/vcsSubversion/subversion.py	Wed Jun 27 19:44:39 2012 +0200
+++ b/Plugins/VcsPlugins/vcsSubversion/subversion.py	Sat Jun 30 14:17:27 2012 +0200
@@ -537,7 +537,7 @@
             res = False
         else:
             dia = SvnDialog(self.trUtf8('Synchronizing with the Subversion repository'))
-            res = dia.startProcess(args, dname)
+            res = dia.startProcess(args, dname, True)
             if res:
                 dia.exec_()
                 res = dia.hasAddOrDelete()
@@ -1031,7 +1031,7 @@
         
         dia = SvnDialog(self.trUtf8('Switching to {0}')
             .format(tn))
-        res = dia.startProcess(args)
+        res = dia.startProcess(args, setLanguage=True)
         if res:
             dia.exec_()
             res = dia.hasAddOrDelete()

eric ide

mercurial