eric6/Plugins/VcsPlugins/vcsSubversion/SvnUrlSelectionDialog.py

changeset 7775
4a1db75550bd
parent 7360
9190402e4505
child 7923
91e843545d9a
diff -r 9eed155411f0 -r 4a1db75550bd eric6/Plugins/VcsPlugins/vcsSubversion/SvnUrlSelectionDialog.py
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/SvnUrlSelectionDialog.py	Sat Oct 10 16:03:53 2020 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsSubversion/SvnUrlSelectionDialog.py	Sun Oct 11 17:54:52 2020 +0200
@@ -7,8 +7,9 @@
 Module implementing a dialog to enter the URLs for the svn diff command.
 """
 
+import re
 
-from PyQt5.QtCore import QRegExp, pyqtSlot
+from PyQt5.QtCore import pyqtSlot
 from PyQt5.QtWidgets import QDialog
 
 from E5Gui.E5Application import e5App
@@ -61,8 +62,9 @@
         
         if self.vcs.otherData["standardLayout"]:
             # determine the base path of the project in the repository
-            rx_base = QRegExp('(.+/)(trunk|tags|branches).*')
-            if not rx_base.exactMatch(reposURL):
+            rx_base = re.compile('(.+/)(trunk|tags|branches).*')
+            match = rx_base.fullmatch(reposURL)
+            if match is None:
                 E5MessageBox.critical(
                     self,
                     self.tr("Subversion Error"),
@@ -73,7 +75,7 @@
                 self.reject()
                 return
             
-            reposRoot = rx_base.cap(1)
+            reposRoot = match.group(1)
             self.repoRootLabel1.setText(reposRoot)
             self.repoRootLabel2.setText(reposRoot)
         else:

eric ide

mercurial