Plugins/VcsPlugins/vcsMercurial/hg.py

changeset 417
459855d3066e
parent 347
0b1a7a38f8e9
child 495
b31b0bffa5b0
--- a/Plugins/VcsPlugins/vcsMercurial/hg.py	Tue Jul 27 12:58:35 2010 +0200
+++ b/Plugins/VcsPlugins/vcsMercurial/hg.py	Tue Jul 27 17:15:48 2010 +0200
@@ -264,9 +264,9 @@
             rev = None
         vcsUrl = self.hgNormalizeURL(vcsDataDict["url"])
         if vcsUrl.startswith('/'):
-            vcsUrl = 'file://%s' % vcsUrl
+            vcsUrl = 'file://{0}'.format(vcsUrl)
         elif vcsUrl[1] in ['|', ':']:
-            vcsUrl = 'file:///%s' % vcsUrl
+            vcsUrl = 'file:///{0}'.format(vcsUrl)
         
         args = []
         args.append('clone')
@@ -1090,19 +1090,20 @@
             user = url[1]
             host = url[2]
             port, path = url[3].split("/",1)
-            return "%s:%s:%s:%s/%s" % (scheme, user, host, port, urllib.parse.quote(path))
+            return "{0}:{1}:{2}:{3}/{4}".format(
+                scheme, user, host, port, urllib.parse.quote(path))
         elif len(url) == 3:
             scheme = url[0]
             host = url[1]
             port, path = url[2].split("/",1)
-            return "%s:%s:%s/%s" % (scheme, host, port, urllib.parse.quote(path))
+            return "{0}:{1}:{2}/{3}".format(scheme, host, port, urllib.parse.quote(path))
         else:
             scheme = url[0]
             if scheme == "file":
-                return "%s:%s" % (scheme, urllib.parse.quote(url[1]))
+                return "{0}:{1}".format(scheme, urllib.parse.quote(url[1]))
             else:
                 host, path = url[1][2:].split("/",1)
-                return "%s://%s/%s" % (scheme, host, urllib.parse.quote(path))
+                return "{0}://{1}/{2}".format(scheme, host, urllib.parse.quote(path))
 
     def hgNormalizeURL(self, url):
         """
@@ -1115,7 +1116,7 @@
         if url.endswith('/'):
             url = url[:-1]
         urll = url.split('//')
-        return "%s//%s" % (urll[0], '/'.join(urll[1:]))
+        return "{0}//{1}".format(urll[0], '/'.join(urll[1:]))
     
     def hgCopy(self, name, project):
         """

eric ide

mercurial