##// END OF EJS Templates
Change remote repository to httprepository
Matt Mackall -
r623:31486796 default
parent child Browse files
Show More
@@ -1498,7 +1498,7 b' class localrepository:'
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
@@ -1593,12 +1593,12 b' class remoterepository:'
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)
1604
1603
1604 return localrepository(ui, path, create)
General Comments 0
You need to be logged in to leave comments. Login now