# HG changeset patch # User Matt Mackall # Date 1120614643 28800 # Node ID 314867960a4afe9919324f3b88e6fd77ae14a631 # Parent e9fe5d5e67f7e17e8dfe0b08a8f3de292a09fece Change remote repository to httprepository diff -r e9fe5d5e67f7 -r 314867960a4a mercurial/hg.py --- a/mercurial/hg.py Tue Jul 05 17:50:02 2005 -0800 +++ b/mercurial/hg.py Tue Jul 05 17:50:43 2005 -0800 @@ -1498,7 +1498,7 @@ self.ui.warn("%d integrity errors encountered!\n" % errors) return 1 -class remoterepository: +class httprepository: def __init__(self, ui, path): self.url = path self.ui = ui @@ -1593,12 +1593,12 @@ self.ui.note("%d bytes of data transfered\n" % bytes) def repository(ui, path=None, create=0): - if path and path[:7] == "http://": - return remoterepository(ui, path) - if path and path[:5] == "hg://": - return remoterepository(ui, path.replace("hg://", "http://")) - if path and path[:11] == "old-http://": - return localrepository(ui, path.replace("old-http://", "http://")) - else: - return localrepository(ui, path, create) + if path: + if path.startswith("http://"): + return httprepository(ui, path) + if path.startswith("hg://"): + return httprepository(ui, path.replace("hg://", "http://")) + if path.startswith("old-http://"): + return localrepository(ui, path.replace("old-http://", "http://")) + return localrepository(ui, path, create)