45 self.setupUi(self) |
45 self.setupUi(self) |
46 |
46 |
47 self.repoTree.headerItem().setText(self.repoTree.columnCount(), "") |
47 self.repoTree.headerItem().setText(self.repoTree.columnCount(), "") |
48 self.repoTree.header().setSortIndicator(0, Qt.AscendingOrder) |
48 self.repoTree.header().setSortIndicator(0, Qt.AscendingOrder) |
49 |
49 |
50 self.process = None |
|
51 self.vcs = vcs |
50 self.vcs = vcs |
52 self.mode = mode |
51 self.mode = mode |
|
52 |
|
53 self.process = QProcess() |
|
54 self.process.finished.connect(self.__procFinished) |
|
55 self.process.readyReadStandardOutput.connect(self.__readStdout) |
|
56 self.process.readyReadStandardError.connect(self.__readStderr) |
53 |
57 |
54 if self.mode == "select": |
58 if self.mode == "select": |
55 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
59 self.buttonBox.button(QDialogButtonBox.Ok).setEnabled(False) |
56 self.buttonBox.button(QDialogButtonBox.Close).hide() |
60 self.buttonBox.button(QDialogButtonBox.Close).hide() |
57 else: |
61 else: |
204 |
208 |
205 @param url the repository URL to browse (string) |
209 @param url the repository URL to browse (string) |
206 @param parent reference to the item, the data should be appended to |
210 @param parent reference to the item, the data should be appended to |
207 (QTreeWidget or QTreeWidgetItem) |
211 (QTreeWidget or QTreeWidgetItem) |
208 """ |
212 """ |
|
213 self.errorGroup.hide() |
|
214 |
209 QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) |
215 QApplication.setOverrideCursor(QCursor(Qt.WaitCursor)) |
210 QApplication.processEvents() |
216 QApplication.processEvents() |
211 |
217 |
212 self.repoUrl = url |
218 self.repoUrl = url |
213 |
219 |
239 self.__finish() |
245 self.__finish() |
240 return |
246 return |
241 |
247 |
242 self.intercept = False |
248 self.intercept = False |
243 |
249 |
244 if self.process: |
250 self.process.kill() |
245 self.process.kill() |
|
246 else: |
|
247 self.process = QProcess() |
|
248 self.process.finished.connect(self.__procFinished) |
|
249 self.process.readyReadStandardOutput.connect(self.__readStdout) |
|
250 self.process.readyReadStandardError.connect(self.__readStderr) |
|
251 |
251 |
252 args = [] |
252 args = [] |
253 args.append('list') |
253 args.append('list') |
254 self.vcs.addArguments(args, self.vcs.options['global']) |
254 self.vcs.addArguments(args, self.vcs.options['global']) |
255 if '--verbose' not in self.vcs.options['global']: |
255 if '--verbose' not in self.vcs.options['global']: |
288 """ |
288 """ |
289 Public slot to start the svn info command. |
289 Public slot to start the svn info command. |
290 |
290 |
291 @param url the repository URL to browser (string) |
291 @param url the repository URL to browser (string) |
292 """ |
292 """ |
|
293 self.repoTree.clear() |
|
294 |
293 self.url = "" |
295 self.url = "" |
294 |
296 |
295 self.urlCombo.addItem(self.__normalizeUrl(url)) |
297 url = self.__normalizeUrl(url) |
|
298 if self.urlCombo.findText(url) == -1: |
|
299 self.urlCombo.addItem(url) |
296 |
300 |
297 @pyqtSlot(str) |
301 @pyqtSlot(str) |
298 def on_urlCombo_currentIndexChanged(self, text): |
302 def on_urlCombo_currentIndexChanged(self, text): |
299 """ |
303 """ |
300 Private slot called, when a new repository URL is entered or selected. |
304 Private slot called, when a new repository URL is entered or selected. |
405 name = self.__rx_dir.cap(4).strip() |
409 name = self.__rx_dir.cap(4).strip() |
406 if name.endswith("/"): |
410 if name.endswith("/"): |
407 name = name[:-1] |
411 name = name[:-1] |
408 size = "" |
412 size = "" |
409 nodekind = "dir" |
413 nodekind = "dir" |
|
414 if name == ".": |
|
415 continue |
410 elif self.__rx_file.exactMatch(s): |
416 elif self.__rx_file.exactMatch(s): |
411 revision = self.__rx_file.cap(1) |
417 revision = self.__rx_file.cap(1) |
412 author = self.__rx_file.cap(2) |
418 author = self.__rx_file.cap(2) |
413 size = self.__rx_file.cap(3) |
419 size = self.__rx_file.cap(3) |
414 date = self.__rx_file.cap(4) |
420 date = self.__rx_file.cap(4) |
431 s = str(self.process.readAllStandardError(), |
437 s = str(self.process.readAllStandardError(), |
432 Preferences.getSystem("IOEncoding"), |
438 Preferences.getSystem("IOEncoding"), |
433 'replace') |
439 'replace') |
434 self.errors.insertPlainText(s) |
440 self.errors.insertPlainText(s) |
435 self.errors.ensureCursorVisible() |
441 self.errors.ensureCursorVisible() |
|
442 self.errorGroup.show() |
436 |
443 |
437 def on_passwordCheckBox_toggled(self, isOn): |
444 def on_passwordCheckBox_toggled(self, isOn): |
438 """ |
445 """ |
439 Private slot to handle the password checkbox toggled. |
446 Private slot to handle the password checkbox toggled. |
440 |
447 |