Plugins/VcsPlugins/vcsPySvn/subversion.py

branch
5_2_x
changeset 1684
31da4aea789e
parent 1589
9f0fef4a4fbe
child 1837
36406a806be4
equal deleted inserted replaced
1677:77437a6f8a03 1684:31da4aea789e
2193 Public method to normalize a url for subversion. 2193 Public method to normalize a url for subversion.
2194 2194
2195 @param url url string (string) 2195 @param url url string (string)
2196 @return properly normalized url for subversion (string) 2196 @return properly normalized url for subversion (string)
2197 """ 2197 """
2198 protocol, url = url.split("://")
2199 if url.startswith("\\\\"):
2200 url = url[2:]
2198 url = url.replace('\\', '/') 2201 url = url.replace('\\', '/')
2199 if url.endswith('/'): 2202 if url.endswith('/'):
2200 url = url[:-1] 2203 url = url[:-1]
2201 urll = url.split('//') 2204 return "{0}://{1}".format(protocol, url)
2202 return "{0}//{1}".format(urll[0], '/'.join(urll[1:]))
2203 2205
2204 ############################################################################ 2206 ############################################################################
2205 ## Methods to get the helper objects are below. 2207 ## Methods to get the helper objects are below.
2206 ############################################################################ 2208 ############################################################################
2207 2209

eric ide

mercurial