Plugins/VcsPlugins/vcsSubversion/SvnBlameDialog.py

changeset 945
8cd4d08fa9f6
parent 791
9ec2ac20e54e
child 1112
8a7d1b9d18db
equal deleted inserted replaced
944:1b59c4ba121e 945:8cd4d08fa9f6
14 14
15 from .Ui_SvnBlameDialog import Ui_SvnBlameDialog 15 from .Ui_SvnBlameDialog import Ui_SvnBlameDialog
16 16
17 import Preferences 17 import Preferences
18 import Utilities 18 import Utilities
19
19 20
20 class SvnBlameDialog(QDialog, Ui_SvnBlameDialog): 21 class SvnBlameDialog(QDialog, Ui_SvnBlameDialog):
21 """ 22 """
22 Class implementing a dialog to show the output of the svn blame command. 23 Class implementing a dialog to show the output of the svn blame command.
23 """ 24 """
24 def __init__(self, vcs, parent = None): 25 def __init__(self, vcs, parent=None):
25 """ 26 """
26 Constructor 27 Constructor
27 28
28 @param vcs reference to the vcs object 29 @param vcs reference to the vcs object
29 @param parent parent widget (QWidget) 30 @param parent parent widget (QWidget)
82 83
83 args = [] 84 args = []
84 args.append('blame') 85 args.append('blame')
85 self.vcs.addArguments(args, self.vcs.options['global']) 86 self.vcs.addArguments(args, self.vcs.options['global'])
86 args.append(fname) 87 args.append(fname)
87
88 88
89 self.process.setWorkingDirectory(dname) 89 self.process.setWorkingDirectory(dname)
90 90
91 self.process.start('svn', args) 91 self.process.start('svn', args)
92 procStarted = self.process.waitForStarted() 92 procStarted = self.process.waitForStarted()
154 154
155 @param revision revision string (string) 155 @param revision revision string (string)
156 @param author author of the change (string) 156 @param author author of the change (string)
157 @param text line of text from the annotated file (string) 157 @param text line of text from the annotated file (string)
158 """ 158 """
159 itm = QTreeWidgetItem(self.blameList, 159 itm = QTreeWidgetItem(self.blameList,
160 [revision, author, "{0:d}".format(self.lineno), text]) 160 [revision, author, "{0:d}".format(self.lineno), text])
161 self.lineno += 1 161 self.lineno += 1
162 itm.setTextAlignment(0, Qt.AlignRight) 162 itm.setTextAlignment(0, Qt.AlignRight)
163 itm.setTextAlignment(2, Qt.AlignRight) 163 itm.setTextAlignment(2, Qt.AlignRight)
164 164
188 It reads the error output of the process and inserts it into the 188 It reads the error output of the process and inserts it into the
189 error pane. 189 error pane.
190 """ 190 """
191 if self.process is not None: 191 if self.process is not None:
192 self.errorGroup.show() 192 self.errorGroup.show()
193 s = str(self.process.readAllStandardError(), 193 s = str(self.process.readAllStandardError(),
194 Preferences.getSystem("IOEncoding"), 194 Preferences.getSystem("IOEncoding"),
195 'replace') 195 'replace')
196 self.errors.insertPlainText(s) 196 self.errors.insertPlainText(s)
197 self.errors.ensureCursorVisible() 197 self.errors.ensureCursorVisible()
198 198
199 def on_passwordCheckBox_toggled(self, isOn): 199 def on_passwordCheckBox_toggled(self, isOn):

eric ide

mercurial