Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksListDialog.py

branch
Py2 comp.
changeset 3484
645c12de6b0c
parent 3178
f25fc1364c88
parent 3302
e92f0dd51979
--- a/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksListDialog.py	Sun Mar 30 22:00:14 2014 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/BookmarksExtension/HgBookmarksListDialog.py	Thu Apr 03 23:05:31 2014 +0200
@@ -9,8 +9,8 @@
 
 from __future__ import unicode_literals
 try:
-    str = unicode    # __IGNORE_WARNING__
-except (NameError):
+    str = unicode
+except NameError:
     pass
 
 import os
@@ -23,8 +23,6 @@
 
 from .Ui_HgBookmarksListDialog import Ui_HgBookmarksListDialog
 
-import Preferences
-
 
 class HgBookmarksListDialog(QDialog, Ui_HgBookmarksListDialog):
     """
@@ -100,8 +98,7 @@
             if os.path.splitdrive(repodir)[1] == os.sep:
                 return
         
-        args = []
-        args.append('bookmarks')
+        args = self.vcs.initCommand("bookmarks")
         
         if self.__hgClient:
             self.inputGroup.setEnabled(False)
@@ -127,8 +124,8 @@
                 self.inputGroup.hide()
                 E5MessageBox.critical(
                     self,
-                    self.trUtf8('Process Generation Error'),
-                    self.trUtf8(
+                    self.tr('Process Generation Error'),
+                    self.tr(
                         'The process {0} could not be started. '
                         'Ensure, that it is in the search path.'
                     ).format('hg'))
@@ -161,7 +158,7 @@
         if self.bookmarksList.topLevelItemCount() == 0:
             # no bookmarks defined
             self.__generateItem(
-                self.trUtf8("no bookmarks defined"), "", "", "")
+                self.tr("no bookmarks defined"), "", "", "")
         self.__resizeColumns()
         self.__resort()
     
@@ -232,8 +229,7 @@
         self.process.setReadChannel(QProcess.StandardOutput)
         
         while self.process.canReadLine():
-            s = str(self.process.readLine(),
-                    Preferences.getSystem("IOEncoding"),
+            s = str(self.process.readLine(), self.vcs.getEncoding(),
                     'replace').strip()
             self.__processOutputLine(s)
     
@@ -267,8 +263,7 @@
         """
         if self.process is not None:
             s = str(self.process.readAllStandardError(),
-                    Preferences.getSystem("IOEncoding"),
-                    'replace')
+                    self.vcs.getEncoding(), 'replace')
             self.__showError(s)
     
     def __showError(self, out):

eric ide

mercurial