Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py

changeset 945
8cd4d08fa9f6
parent 917
746c54b643eb
child 1131
7781e396c903
--- a/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py	Fri Mar 11 08:55:14 2011 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/HgStatusDialog.py	Fri Mar 11 16:51:57 2011 +0100
@@ -22,11 +22,12 @@
 
 import Preferences
 
+
 class HgStatusDialog(QWidget, Ui_HgStatusDialog):
     """
     Class implementing a dialog to show the output of the hg status command process.
     """
-    def __init__(self, vcs, parent = None):
+    def __init__(self, vcs, parent=None):
         """
         Constructor
         
@@ -81,13 +82,13 @@
         self.statusList.customContextMenuRequested.connect(self.__showContextMenu)
         
         self.modifiedIndicators = [
-            self.trUtf8('added'), 
-            self.trUtf8('modified'), 
-            self.trUtf8('removed'), 
+            self.trUtf8('added'),
+            self.trUtf8('modified'),
+            self.trUtf8('removed'),
         ]
         
         self.unversionedIndicators = [
-            self.trUtf8('not tracked'), 
+            self.trUtf8('not tracked'),
         ]
         
         self.missingIndicators = [
@@ -95,20 +96,20 @@
         ]
         
         self.status = {
-            'A' : self.trUtf8('added'),
-            'C' : self.trUtf8('normal'),
-            'I' : self.trUtf8('ignored'),
-            'M' : self.trUtf8('modified'),
-            'R' : self.trUtf8('removed'),
-            '?' : self.trUtf8('not tracked'),
-            '!' : self.trUtf8('missing'),
+            'A': self.trUtf8('added'),
+            'C': self.trUtf8('normal'),
+            'I': self.trUtf8('ignored'),
+            'M': self.trUtf8('modified'),
+            'R': self.trUtf8('removed'),
+            '?': self.trUtf8('not tracked'),
+            '!': self.trUtf8('missing'),
         }
     
     def __resort(self):
         """
         Private method to resort the tree.
         """
-        self.statusList.sortItems(self.statusList.sortColumn(), 
+        self.statusList.sortItems(self.statusList.sortColumn(),
             self.statusList.header().sortIndicatorOrder())
     
     def __resizeColumns(self):
@@ -127,9 +128,9 @@
         """
         statusText = self.status[status]
         itm = QTreeWidgetItem(self.statusList, [
-            "", 
-            statusText, 
-            path, 
+            "",
+            statusText,
+            path,
         ])
         
         itm.setTextAlignment(1, Qt.AlignHCenter)
@@ -293,8 +294,8 @@
             self.process.setReadChannel(QProcess.StandardOutput)
             
             while self.process.canReadLine():
-                line = str(self.process.readLine(), 
-                        Preferences.getSystem("IOEncoding"), 
+                line = str(self.process.readLine(),
+                        Preferences.getSystem("IOEncoding"),
                         'replace')
                 if line[0] in "ACIMR?!" and line[1] == " ":
                     status, path = line.strip().split(" ", 1)
@@ -309,8 +310,8 @@
         """
         if self.process is not None:
             self.errorGroup.show()
-            s = str(self.process.readAllStandardError(), 
-                    Preferences.getSystem("IOEncoding"), 
+            s = str(self.process.readAllStandardError(),
+                    Preferences.getSystem("IOEncoding"),
                     'replace')
             self.errors.insertPlainText(s)
             self.errors.ensureCursorVisible()

eric ide

mercurial