Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 5548
95b188f96d3d
parent 5514
1aa13333eb9f
child 5587
ea526b78ee6c
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py	Wed Feb 22 19:25:07 2017 +0100
+++ b/Plugins/VcsPlugins/vcsMercurial/hg.py	Thu Feb 23 18:44:25 2017 +0100
@@ -353,10 +353,6 @@
         except KeyError:
             rev = None
         vcsUrl = self.hgNormalizeURL(vcsDataDict["url"])
-        if vcsUrl.startswith('/'):
-            vcsUrl = 'file://{0}'.format(vcsUrl)
-        elif vcsUrl[1] in ['|', ':']:
-            vcsUrl = 'file:///{0}'.format(vcsUrl)
         
         args = self.initCommand("clone")
         if rev:
@@ -364,7 +360,7 @@
             args.append(rev)
         if vcsDataDict["largefiles"]:
             args.append("--all-largefiles")
-        args.append(self.__hgURL(vcsUrl))
+        args.append(vcsUrl)
         args.append(projectDir)
         
         if noDialog:
@@ -1494,37 +1490,6 @@
     ## Private Mercurial specific methods are below.
     ###########################################################################
     
-    def __hgURL(self, url):
-        """
-        Private method to format a url for Mercurial.
-        
-        @param url unformatted url string (string)
-        @return properly formated url for mercurial (string)
-        """
-        url = self.hgNormalizeURL(url)
-        url = url.split(':', 2)
-        if len(url) == 4:
-            scheme = url[0]
-            user = url[1]
-            host = url[2]
-            port, path = url[3].split("/", 1)
-            return "{0}:{1}:{2}:{3}/{4}".format(
-                scheme, user, host, port, Utilities.quote(path))
-        elif len(url) == 3:
-            scheme = url[0]
-            host = url[1]
-            port, path = url[2].split("/", 1)
-            return "{0}:{1}:{2}/{3}".format(
-                scheme, host, port, Utilities.quote(path))
-        else:
-            scheme = url[0]
-            if scheme == "file":
-                return "{0}:{1}".format(scheme, Utilities.quote(url[1]))
-            else:
-                host, path = url[1][2:].split("/", 1)
-                return "{0}://{1}/{2}".format(
-                    scheme, host, Utilities.quote(path))
-
     def hgNormalizeURL(self, url):
         """
         Public method to normalize a url for Mercurial.

eric ide

mercurial