mercurial/util.py
changeset 1101 2cf5c8a4eae5
parent 1090 1bca39b85615
child 1102 c81d264cd17d
equal deleted inserted replaced
1100:d6b6a15cc7c6 1101:2cf5c8a4eae5
   241 
   241 
   242     todo: separate remote file access into a separate function
   242     todo: separate remote file access into a separate function
   243     """
   243     """
   244     p = base
   244     p = base
   245     def o(path, mode="r"):
   245     def o(path, mode="r"):
   246         if p.startswith("http://"):
       
   247             f = os.path.join(p, urllib.quote(path))
       
   248             return httprangereader.httprangereader(f)
       
   249 
       
   250         f = os.path.join(p, path)
   246         f = os.path.join(p, path)
   251 
   247 
   252         mode += "b" # for that other OS
   248         mode += "b" # for that other OS
   253 
   249 
   254         if mode[0] != "r":
   250         if mode[0] != "r":