diff -r 9eed155411f0 -r 4a1db75550bd eric6/Plugins/VcsPlugins/vcsSubversion/SvnRepoBrowserDialog.py --- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnRepoBrowserDialog.py Sat Oct 10 16:03:53 2020 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnRepoBrowserDialog.py Sun Oct 11 17:54:52 2020 +0200 @@ -7,14 +7,13 @@ Module implementing the subversion repository browser dialog. """ - +import re import os +from PyQt5.QtCore import pyqtSlot, Qt, QTimer, QProcess from PyQt5.QtWidgets import ( - QHeaderView, QLineEdit, QDialog, QApplication, QDialogButtonBox, - QTreeWidgetItem + QHeaderView, QLineEdit, QDialog, QDialogButtonBox, QTreeWidgetItem ) -from PyQt5.QtCore import QTimer, QProcess, QRegExp, Qt, pyqtSlot from E5Gui import E5MessageBox from E5Gui.E5OverrideCursor import E5OverrideCursorProcess @@ -68,10 +67,10 @@ self.__ignoreExpand = False self.intercept = False - self.__rx_dir = QRegExp( + self.__rx_dir = re.compile( r"""\s*([0-9]+)\s+(\w+)\s+""" r"""((?:\w+\s+\d+|[0-9.]+\s+\w+)\s+[0-9:]+)\s+(.+)\s*""") - self.__rx_file = QRegExp( + self.__rx_file = re.compile( r"""\s*([0-9]+)\s+(\w+)\s+([0-9]+)\s""" r"""((?:\w+\s+\d+|[0-9.]+\s+\w+)\s+[0-9:]+)\s+(.+)\s*""") @@ -402,26 +401,31 @@ s = str(self.__process.readLine(), Preferences.getSystem("IOEncoding"), 'replace') - if self.__rx_dir.exactMatch(s): - revision = self.__rx_dir.cap(1) - author = self.__rx_dir.cap(2) - date = self.__rx_dir.cap(3) - name = self.__rx_dir.cap(4).strip() + match = ( + self.__rx_dir.fullmatch(s) or + self.__rx_file.fullmatch(s) + ) + if match is None: + continue + elif match.re is self.__rx_dir: + revision = match.group(1) + author = match.group(2) + date = match.group(3) + name = match.group(4).strip() if name.endswith("/"): name = name[:-1] size = "" nodekind = "dir" if name == ".": continue - elif self.__rx_file.exactMatch(s): - revision = self.__rx_file.cap(1) - author = self.__rx_file.cap(2) - size = self.__rx_file.cap(3) - date = self.__rx_file.cap(4) - name = self.__rx_file.cap(5).strip() + elif match.re is self.__rx_file: + revision = match.group(1) + author = match.group(2) + size = match.group(3) + date = match.group(4) + name = match.group(5).strip() nodekind = "file" - else: - continue + url = "{0}/{1}".format(self.repoUrl, name) self.__generateItem( name, revision, author, size, date, nodekind, url)