Fixed an issue with building Subversion URLs, if the path contains a Windows share path.

Wed, 29 Feb 2012 20:09:55 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 29 Feb 2012 20:09:55 +0100
changeset 1683
ef9a9e86269e
parent 1682
0eefcc28fa74
child 1685
7640d5500966

Fixed an issue with building Subversion URLs, if the path contains a Windows share path.

Plugins/VcsPlugins/vcsPySvn/subversion.py file | annotate | diff | comparison | revisions
Plugins/VcsPlugins/vcsSubversion/subversion.py file | annotate | diff | comparison | revisions
--- a/Plugins/VcsPlugins/vcsPySvn/subversion.py	Mon Feb 27 19:33:51 2012 +0100
+++ b/Plugins/VcsPlugins/vcsPySvn/subversion.py	Wed Feb 29 20:09:55 2012 +0100
@@ -2195,11 +2195,13 @@
         @param url url string (string)
         @return properly normalized url for subversion (string)
         """
+        protocol, url = url.split("://")
+        if url.startswith("\\\\"):
+            url = url[2:]
         url = url.replace('\\', '/')
         if url.endswith('/'):
             url = url[:-1]
-        urll = url.split('//')
-        return "{0}//{1}".format(urll[0], '/'.join(urll[1:]))
+        return "{0}://{1}".format(protocol, url)
 
     ############################################################################
     ## Methods to get the helper objects are below.
--- a/Plugins/VcsPlugins/vcsSubversion/subversion.py	Mon Feb 27 19:33:51 2012 +0100
+++ b/Plugins/VcsPlugins/vcsSubversion/subversion.py	Wed Feb 29 20:09:55 2012 +0100
@@ -1976,11 +1976,13 @@
         @param url url string (string)
         @return properly normalized url for subversion (string)
         """
+        protocol, url = url.split("://")
+        if url.startswith("\\\\"):
+            url = url[2:]
         url = url.replace('\\', '/')
         if url.endswith('/'):
             url = url[:-1]
-        urll = url.split('//')
-        return "{0}//{1}".format(urll[0], '/'.join(urll[1:]))
+        return "{0}://{1}".format(protocol, url)
 
     ############################################################################
     ## Methods to get the helper objects are below.

eric ide

mercurial