Plugins/VcsPlugins/vcsSubversion/subversion.py

branch
Py2 comp.
changeset 3141
72f3bde98c58
parent 3060
5883ce99ee12
child 3142
55030c09e142
equal deleted inserted replaced
3127:e47a9d5954e8 3141:72f3bde98c58
14 pass 14 pass
15 15
16 import os 16 import os
17 import re 17 import re
18 import shutil 18 import shutil
19 import urllib.parse
20 19
21 from PyQt4.QtCore import pyqtSignal, QProcess, QRegExp 20 from PyQt4.QtCore import pyqtSignal, QProcess, QRegExp
22 from PyQt4.QtGui import QLineEdit, QDialog, QInputDialog, QApplication 21 from PyQt4.QtGui import QLineEdit, QDialog, QInputDialog, QApplication
23 22
24 from E5Gui.E5Application import e5App 23 from E5Gui.E5Application import e5App
993 """ be aborted""")) 992 """ be aborted"""))
994 return 993 return
995 994
996 reposRoot = rx_base.cap(1) 995 reposRoot = rx_base.cap(1)
997 if tagOp in [1, 4]: 996 if tagOp in [1, 4]:
998 url = '{0}/tags/{1}'.format(reposRoot, urllib.parse.quote(tag)) 997 url = '{0}/tags/{1}'.format(reposRoot, Utilities.quote(tag))
999 elif tagOp in [2, 8]: 998 elif tagOp in [2, 8]:
1000 url = '{0}/branches/{1}'.format( 999 url = '{0}/branches/{1}'.format(
1001 reposRoot, urllib.parse.quote(tag)) 1000 reposRoot, Utilities.quote(tag))
1002 else: 1001 else:
1003 url = self.__svnURL(tag) 1002 url = self.__svnURL(tag)
1004 1003
1005 args = [] 1004 args = []
1006 if tagOp in [1, 2]: 1005 if tagOp in [1, 2]:
1116 return False 1115 return False
1117 1116
1118 reposRoot = rx_base.cap(1) 1117 reposRoot = rx_base.cap(1)
1119 tn = tag 1118 tn = tag
1120 if tagType == 1: 1119 if tagType == 1:
1121 url = '{0}/tags/{1}'.format(reposRoot, urllib.parse.quote(tag)) 1120 url = '{0}/tags/{1}'.format(reposRoot, Utilities.quote(tag))
1122 elif tagType == 2: 1121 elif tagType == 2:
1123 url = '{0}/branches/{1}'.format( 1122 url = '{0}/branches/{1}'.format(
1124 reposRoot, urllib.parse.quote(tag)) 1123 reposRoot, Utilities.quote(tag))
1125 elif tagType == 4: 1124 elif tagType == 4:
1126 url = '{0}/trunk'.format(reposRoot) 1125 url = '{0}/trunk'.format(reposRoot)
1127 tn = 'HEAD' 1126 tn = 'HEAD'
1128 else: 1127 else:
1129 url = self.__svnURL(tag) 1128 url = self.__svnURL(tag)
2280 if len(url) == 3: 2279 if len(url) == 3:
2281 scheme = url[0] 2280 scheme = url[0]
2282 host = url[1] 2281 host = url[1]
2283 port, path = url[2].split("/", 1) 2282 port, path = url[2].split("/", 1)
2284 return "{0}:{1}:{2}/{3}".format( 2283 return "{0}:{1}:{2}/{3}".format(
2285 scheme, host, port, urllib.parse.quote(path)) 2284 scheme, host, port, Utilities.quote(path))
2286 else: 2285 else:
2287 scheme = url[0] 2286 scheme = url[0]
2288 if scheme == "file": 2287 if scheme == "file":
2289 return "{0}:{1}".format(scheme, urllib.parse.quote(url[1])) 2288 return "{0}:{1}".format(scheme, Utilities.quote(url[1]))
2290 else: 2289 else:
2291 try: 2290 try:
2292 host, path = url[1][2:].split("/", 1) 2291 host, path = url[1][2:].split("/", 1)
2293 except ValueError: 2292 except ValueError:
2294 host = url[1][2:] 2293 host = url[1][2:]
2295 path = "" 2294 path = ""
2296 return "{0}://{1}/{2}".format( 2295 return "{0}://{1}/{2}".format(
2297 scheme, host, urllib.parse.quote(path)) 2296 scheme, host, Utilities.quote(path))
2298 2297
2299 def svnNormalizeURL(self, url): 2298 def svnNormalizeURL(self, url):
2300 """ 2299 """
2301 Public method to normalize a url for subversion. 2300 Public method to normalize a url for subversion.
2302 2301

eric ide

mercurial