Plugins/VcsPlugins/vcsPySvn/subversion.py

changeset 1683
ef9a9e86269e
parent 1588
dccffd13be8d
child 1837
36406a806be4
equal deleted inserted replaced
1682:0eefcc28fa74 1683:ef9a9e86269e
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