eric6/Plugins/VcsPlugins/vcsSubversion/subversion.py

branch
without_py2_and_pyqt4
changeset 7192
a22eee00b052
parent 7167
b3557e77314a
child 7229
53054eb5b15a
--- a/eric6/Plugins/VcsPlugins/vcsSubversion/subversion.py	Sat Aug 31 12:29:57 2019 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsSubversion/subversion.py	Sat Aug 31 12:58:11 2019 +0200
@@ -8,14 +8,11 @@
 """
 
 from __future__ import unicode_literals
-try:
-    str = unicode
-except NameError:
-    pass
 
 import os
 import re
 import shutil
+from urllib.parse import quote
 
 from PyQt5.QtCore import pyqtSignal, QProcess, QRegExp, QCoreApplication
 from PyQt5.QtWidgets import QLineEdit, QDialog, QInputDialog, QApplication
@@ -994,10 +991,9 @@
             
             reposRoot = rx_base.cap(1)
             if tagOp in [1, 4]:
-                url = '{0}/tags/{1}'.format(reposRoot, Utilities.quote(tag))
+                url = '{0}/tags/{1}'.format(reposRoot, quote(tag))
             elif tagOp in [2, 8]:
-                url = '{0}/branches/{1}'.format(
-                    reposRoot, Utilities.quote(tag))
+                url = '{0}/branches/{1}'.format(reposRoot, quote(tag))
         else:
             url = self.__svnURL(tag)
         
@@ -1117,10 +1113,9 @@
             reposRoot = rx_base.cap(1)
             tn = tag
             if tagType == 1:
-                url = '{0}/tags/{1}'.format(reposRoot, Utilities.quote(tag))
+                url = '{0}/tags/{1}'.format(reposRoot, quote(tag))
             elif tagType == 2:
-                url = '{0}/branches/{1}'.format(
-                    reposRoot, Utilities.quote(tag))
+                url = '{0}/branches/{1}'.format(reposRoot, quote(tag))
             elif tagType == 4:
                 url = '{0}/trunk'.format(reposRoot)
                 tn = 'HEAD'
@@ -2307,20 +2302,18 @@
             scheme = url[0]
             host = url[1]
             port, path = url[2].split("/", 1)
-            return "{0}:{1}:{2}/{3}".format(
-                scheme, host, port, Utilities.quote(path))
+            return "{0}:{1}:{2}/{3}".format(scheme, host, port, quote(path))
         else:
             scheme = url[0]
             if scheme == "file":
-                return "{0}:{1}".format(scheme, Utilities.quote(url[1]))
+                return "{0}:{1}".format(scheme, quote(url[1]))
             else:
                 try:
                     host, path = url[1][2:].split("/", 1)
                 except ValueError:
                     host = url[1][2:]
                     path = ""
-                return "{0}://{1}/{2}".format(
-                    scheme, host, Utilities.quote(path))
+                return "{0}://{1}/{2}".format(scheme, host, quote(path))
 
     def svnNormalizeURL(self, url):
         """

eric ide

mercurial