comparison mercurial/statichttprepo.py @ 3794:630caaf29815

use forward "/" for internal path and static http, fix issue437
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Tue, 05 Dec 2006 16:33:40 +0100
parents 8643b9f90b51
children 8f18e31c4441
comparison
equal deleted inserted replaced
3793:f3fbf76d043c 3794:630caaf29815
23 23
24 def opener(base): 24 def opener(base):
25 """return a function that opens files over http""" 25 """return a function that opens files over http"""
26 p = base 26 p = base
27 def o(path, mode="r"): 27 def o(path, mode="r"):
28 f = os.path.join(p, urllib.quote(path)) 28 f = "/".join((p, urllib.quote(path)))
29 return rangereader(f) 29 return rangereader(f)
30 return o 30 return o
31 31
32 class statichttprepository(localrepo.localrepository): 32 class statichttprepository(localrepo.localrepository):
33 def __init__(self, ui, path): 33 def __init__(self, ui, path):