##// END OF EJS Templates
use forward "/" for internal path and static http, fix issue437
Benoit Boissinot -
r3794:630caaf2 default
parent child Browse files
Show More
@@ -12,8 +12,8 b' demandload(globals(), "os")'
12 class filelog(revlog):
12 class filelog(revlog):
13 def __init__(self, opener, path, defversion=REVLOG_DEFAULT_VERSION):
13 def __init__(self, opener, path, defversion=REVLOG_DEFAULT_VERSION):
14 revlog.__init__(self, opener,
14 revlog.__init__(self, opener,
15 os.path.join("data", self.encodedir(path + ".i")),
15 "/".join(("data", self.encodedir(path + ".i"))),
16 os.path.join("data", self.encodedir(path + ".d")),
16 "/".join(("data", self.encodedir(path + ".d"))),
17 defversion)
17 defversion)
18
18
19 # This avoids a collision between a file named foo and a dir named
19 # This avoids a collision between a file named foo and a dir named
@@ -25,7 +25,7 b' 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
General Comments 0
You need to be logged in to leave comments. Login now