42 |
42 |
43 self.annotateList.headerItem().setText( |
43 self.annotateList.headerItem().setText( |
44 self.annotateList.columnCount(), "") |
44 self.annotateList.columnCount(), "") |
45 font = Preferences.getEditorOtherFonts("MonospacedFont") |
45 font = Preferences.getEditorOtherFonts("MonospacedFont") |
46 self.annotateList.setFont(font) |
46 self.annotateList.setFont(font) |
47 |
|
48 self.__ioEncoding = Preferences.getSystem("IOEncoding") |
|
49 |
47 |
50 if self.__hgClient: |
48 if self.__hgClient: |
51 self.process = None |
49 self.process = None |
52 else: |
50 else: |
53 self.process = QProcess() |
51 self.process = QProcess() |
94 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): |
92 while not os.path.isdir(os.path.join(repodir, self.vcs.adminDir)): |
95 repodir = os.path.dirname(repodir) |
93 repodir = os.path.dirname(repodir) |
96 if os.path.splitdrive(repodir)[1] == os.sep: |
94 if os.path.splitdrive(repodir)[1] == os.sep: |
97 return |
95 return |
98 |
96 |
99 args = [] |
97 args = self.vcs.initCommand("annotate") |
100 args.append('annotate') |
|
101 args.append('--follow') |
98 args.append('--follow') |
102 args.append('--user') |
99 args.append('--user') |
103 args.append('--date') |
100 args.append('--date') |
104 args.append('--number') |
101 args.append('--number') |
105 args.append('--changeset') |
102 args.append('--changeset') |
218 the annotation list. |
215 the annotation list. |
219 """ |
216 """ |
220 self.process.setReadChannel(QProcess.StandardOutput) |
217 self.process.setReadChannel(QProcess.StandardOutput) |
221 |
218 |
222 while self.process.canReadLine(): |
219 while self.process.canReadLine(): |
223 s = str(self.process.readLine(), self.__ioEncoding, 'replace')\ |
220 s = str(self.process.readLine(), self.vcs.getEncoding(), |
224 .strip() |
221 'replace').strip() |
225 self.__processOutputLine(s) |
222 self.__processOutputLine(s) |
226 |
223 |
227 def __processOutputLine(self, line): |
224 def __processOutputLine(self, line): |
228 """ |
225 """ |
229 Private method to process the lines of output. |
226 Private method to process the lines of output. |
245 It reads the error output of the process and inserts it into the |
242 It reads the error output of the process and inserts it into the |
246 error pane. |
243 error pane. |
247 """ |
244 """ |
248 if self.process is not None: |
245 if self.process is not None: |
249 s = str(self.process.readAllStandardError(), |
246 s = str(self.process.readAllStandardError(), |
250 Preferences.getSystem("IOEncoding"), |
247 self.vcs.getEncoding(), 'replace') |
251 'replace') |
|
252 self.__showError(s) |
248 self.__showError(s) |
253 |
249 |
254 def __showError(self, out): |
250 def __showError(self, out): |
255 """ |
251 """ |
256 Private slot to show some error. |
252 Private slot to show some error. |