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

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

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 29 Feb 2012 20:09:55 +0100
branch
5_2_x
changeset 1684
31da4aea789e
parent 1677
77437a6f8a03
child 1690
273c6a70d2e3

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	Sun Feb 26 10:06:58 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	Sun Feb 26 10:06:58 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