1443 scheme = url[0] |
1442 scheme = url[0] |
1444 user = url[1] |
1443 user = url[1] |
1445 host = url[2] |
1444 host = url[2] |
1446 port, path = url[3].split("/", 1) |
1445 port, path = url[3].split("/", 1) |
1447 return "{0}:{1}:{2}:{3}/{4}".format( |
1446 return "{0}:{1}:{2}:{3}/{4}".format( |
1448 scheme, user, host, port, parse.quote(path)) |
1447 scheme, user, host, port, Utilities.quote(path)) |
1449 elif len(url) == 3: |
1448 elif len(url) == 3: |
1450 scheme = url[0] |
1449 scheme = url[0] |
1451 host = url[1] |
1450 host = url[1] |
1452 port, path = url[2].split("/", 1) |
1451 port, path = url[2].split("/", 1) |
1453 return "{0}:{1}:{2}/{3}".format( |
1452 return "{0}:{1}:{2}/{3}".format( |
1454 scheme, host, port, parse.quote(path)) |
1453 scheme, host, port, Utilities.quote(path)) |
1455 else: |
1454 else: |
1456 scheme = url[0] |
1455 scheme = url[0] |
1457 if scheme == "file": |
1456 if scheme == "file": |
1458 return "{0}:{1}".format(scheme, parse.quote(url[1])) |
1457 return "{0}:{1}".format(scheme, Utilities.quote(url[1])) |
1459 else: |
1458 else: |
1460 host, path = url[1][2:].split("/", 1) |
1459 host, path = url[1][2:].split("/", 1) |
1461 return "{0}://{1}/{2}".format( |
1460 return "{0}://{1}/{2}".format( |
1462 scheme, host, parse.quote(path)) |
1461 scheme, host, Utilities.quote(path)) |
1463 |
1462 |
1464 def hgNormalizeURL(self, url): |
1463 def hgNormalizeURL(self, url): |
1465 """ |
1464 """ |
1466 Public method to normalize a url for Mercurial. |
1465 Public method to normalize a url for Mercurial. |
1467 |
1466 |