Plugins/VcsPlugins/vcsSubversion/subversion.py

changeset 1683
ef9a9e86269e
parent 1588
dccffd13be8d
child 1837
36406a806be4
equal deleted inserted replaced
1682:0eefcc28fa74 1683:ef9a9e86269e
1974 Public method to normalize a url for subversion. 1974 Public method to normalize a url for subversion.
1975 1975
1976 @param url url string (string) 1976 @param url url string (string)
1977 @return properly normalized url for subversion (string) 1977 @return properly normalized url for subversion (string)
1978 """ 1978 """
1979 protocol, url = url.split("://")
1980 if url.startswith("\\\\"):
1981 url = url[2:]
1979 url = url.replace('\\', '/') 1982 url = url.replace('\\', '/')
1980 if url.endswith('/'): 1983 if url.endswith('/'):
1981 url = url[:-1] 1984 url = url[:-1]
1982 urll = url.split('//') 1985 return "{0}://{1}".format(protocol, url)
1983 return "{0}//{1}".format(urll[0], '/'.join(urll[1:]))
1984 1986
1985 ############################################################################ 1987 ############################################################################
1986 ## Methods to get the helper objects are below. 1988 ## Methods to get the helper objects are below.
1987 ############################################################################ 1989 ############################################################################
1988 1990

eric ide

mercurial