Plugins/VcsPlugins/vcsMercurial/HgAnnotateDialog.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1131
7781e396c903
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
17 17
18 from .Ui_HgAnnotateDialog import Ui_HgAnnotateDialog 18 from .Ui_HgAnnotateDialog import Ui_HgAnnotateDialog
19 19
20 import Preferences 20 import Preferences
21 import Utilities 21 import Utilities
22
22 23
23 class HgAnnotateDialog(QDialog, Ui_HgAnnotateDialog): 24 class HgAnnotateDialog(QDialog, Ui_HgAnnotateDialog):
24 """ 25 """
25 Class implementing a dialog to show the output of the hg annotate command. 26 Class implementing a dialog to show the output of the hg annotate command.
26 """ 27 """
27 def __init__(self, vcs, parent = None): 28 def __init__(self, vcs, parent=None):
28 """ 29 """
29 Constructor 30 Constructor
30 31
31 @param vcs reference to the vcs object 32 @param vcs reference to the vcs object
32 @param parent parent widget (QWidget) 33 @param parent parent widget (QWidget)
173 @param changeset changeset string (string) 174 @param changeset changeset string (string)
174 @param author author of the change (string) 175 @param author author of the change (string)
175 @param date date of the tag (string) 176 @param date date of the tag (string)
176 @param name name (path) of the tag (string) 177 @param name name (path) of the tag (string)
177 """ 178 """
178 itm = QTreeWidgetItem(self.annotateList, 179 itm = QTreeWidgetItem(self.annotateList,
179 [revision, changeset, author, date, "{0:d}".format(self.lineno), text]) 180 [revision, changeset, author, date, "{0:d}".format(self.lineno), text])
180 self.lineno += 1 181 self.lineno += 1
181 itm.setTextAlignment(0, Qt.AlignRight) 182 itm.setTextAlignment(0, Qt.AlignRight)
182 itm.setTextAlignment(4, Qt.AlignRight) 183 itm.setTextAlignment(4, Qt.AlignRight)
183 184
207 It reads the error output of the process and inserts it into the 208 It reads the error output of the process and inserts it into the
208 error pane. 209 error pane.
209 """ 210 """
210 if self.process is not None: 211 if self.process is not None:
211 self.errorGroup.show() 212 self.errorGroup.show()
212 s = str(self.process.readAllStandardError(), 213 s = str(self.process.readAllStandardError(),
213 Preferences.getSystem("IOEncoding"), 214 Preferences.getSystem("IOEncoding"),
214 'replace') 215 'replace')
215 self.errors.insertPlainText(s) 216 self.errors.insertPlainText(s)
216 self.errors.ensureCursorVisible() 217 self.errors.ensureCursorVisible()
217 218
218 def on_passwordCheckBox_toggled(self, isOn): 219 def on_passwordCheckBox_toggled(self, isOn):

eric ide

mercurial