Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/hg.py @ 623:314867960a4a
Change remote repository to httprepository
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 05 Jul 2005 17:50:43 -0800 |
parents | e9fe5d5e67f7 |
children | 876333a295ff |
comparison
equal
deleted
inserted
replaced
622:e9fe5d5e67f7 | 623:314867960a4a |
---|---|
1496 | 1496 |
1497 if errors: | 1497 if errors: |
1498 self.ui.warn("%d integrity errors encountered!\n" % errors) | 1498 self.ui.warn("%d integrity errors encountered!\n" % errors) |
1499 return 1 | 1499 return 1 |
1500 | 1500 |
1501 class remoterepository: | 1501 class httprepository: |
1502 def __init__(self, ui, path): | 1502 def __init__(self, ui, path): |
1503 self.url = path | 1503 self.url = path |
1504 self.ui = ui | 1504 self.ui = ui |
1505 no_list = [ "localhost", "127.0.0.1" ] | 1505 no_list = [ "localhost", "127.0.0.1" ] |
1506 host = ui.config("http_proxy", "host") | 1506 host = ui.config("http_proxy", "host") |
1591 break | 1591 break |
1592 yield zd.decompress(d) | 1592 yield zd.decompress(d) |
1593 self.ui.note("%d bytes of data transfered\n" % bytes) | 1593 self.ui.note("%d bytes of data transfered\n" % bytes) |
1594 | 1594 |
1595 def repository(ui, path=None, create=0): | 1595 def repository(ui, path=None, create=0): |
1596 if path and path[:7] == "http://": | 1596 if path: |
1597 return remoterepository(ui, path) | 1597 if path.startswith("http://"): |
1598 if path and path[:5] == "hg://": | 1598 return httprepository(ui, path) |
1599 return remoterepository(ui, path.replace("hg://", "http://")) | 1599 if path.startswith("hg://"): |
1600 if path and path[:11] == "old-http://": | 1600 return httprepository(ui, path.replace("hg://", "http://")) |
1601 return localrepository(ui, path.replace("old-http://", "http://")) | 1601 if path.startswith("old-http://"): |
1602 else: | 1602 return localrepository(ui, path.replace("old-http://", "http://")) |
1603 return localrepository(ui, path, create) | 1603 |
1604 | 1604 return localrepository(ui, path, create) |