equal
deleted
inserted
replaced
2084 |
2084 |
2085 source, branches = hg.parseurl(ui.expandpath(source)) |
2085 source, branches = hg.parseurl(ui.expandpath(source)) |
2086 url = util.url(source) |
2086 url = util.url(source) |
2087 addr = None |
2087 addr = None |
2088 |
2088 |
2089 if url.scheme == 'https': |
2089 defaultport = {'https': 443, 'ssh': 22} |
2090 addr = (url.host, url.port or 443) |
2090 if url.scheme in defaultport: |
2091 elif url.scheme == 'ssh': |
2091 try: |
2092 addr = (url.host, url.port or 22) |
2092 addr = (url.host, int(url.port or defaultport[url.scheme])) |
|
2093 except ValueError: |
|
2094 raise error.Abort(_("malformed port number in URL")) |
2093 else: |
2095 else: |
2094 raise error.Abort(_("only https and ssh connections are supported")) |
2096 raise error.Abort(_("only https and ssh connections are supported")) |
2095 |
2097 |
2096 from . import win32 |
2098 from . import win32 |
2097 |
2099 |