mercurial/hg.py
changeset 765 1e31d97c3d70
parent 764 eea96285cbf9
child 768 20e95c245bc3
equal deleted inserted replaced
764:eea96285cbf9 765:1e31d97c3d70
     8 import sys, struct, os
     8 import sys, struct, os
     9 import util
     9 import util
    10 from revlog import *
    10 from revlog import *
    11 from demandload import *
    11 from demandload import *
    12 demandload(globals(), "re lock urllib urllib2 transaction time socket")
    12 demandload(globals(), "re lock urllib urllib2 transaction time socket")
    13 demandload(globals(), "tempfile httprangereader bdiff")
    13 demandload(globals(), "tempfile httprangereader bdiff urlparse")
    14 demandload(globals(), "bisect select")
    14 demandload(globals(), "bisect select")
    15 
    15 
    16 class filelog(revlog):
    16 class filelog(revlog):
    17     def __init__(self, opener, path):
    17     def __init__(self, opener, path):
    18         revlog.__init__(self, opener,
    18         revlog.__init__(self, opener,
  1690             self.ui.warn("%d integrity errors encountered!\n" % errors)
  1690             self.ui.warn("%d integrity errors encountered!\n" % errors)
  1691             return 1
  1691             return 1
  1692 
  1692 
  1693 class httprepository:
  1693 class httprepository:
  1694     def __init__(self, ui, path):
  1694     def __init__(self, ui, path):
  1695         self.url = path
  1695         # fix missing / after hostname
       
  1696         s = urlparse.urlsplit(path)
       
  1697         partial = s[2]
       
  1698         if not partial: partial = "/"
       
  1699         self.url = urlparse.urlunsplit((s[0], s[1], partial, '', ''))
  1696         self.ui = ui
  1700         self.ui = ui
  1697         no_list = [ "localhost", "127.0.0.1" ]
  1701         no_list = [ "localhost", "127.0.0.1" ]
  1698         host = ui.config("http_proxy", "host")
  1702         host = ui.config("http_proxy", "host")
  1699         if host is None:
  1703         if host is None:
  1700             host = os.environ.get("http_proxy")
  1704             host = os.environ.get("http_proxy")