use forward "/" for internal path and static http, fix issue437
authorBenoit Boissinot <benoit.boissinot@ens-lyon.org>
Tue, 05 Dec 2006 16:33:40 +0100
changeset 3794 630caaf29815
parent 3793 f3fbf76d043c
child 3795 17a11f4ff260
child 3801 bd7011246fab
use forward "/" for internal path and static http, fix issue437
mercurial/filelog.py
mercurial/statichttprepo.py
--- a/mercurial/filelog.py	Tue Dec 05 15:21:41 2006 +0100
+++ b/mercurial/filelog.py	Tue Dec 05 16:33:40 2006 +0100
@@ -12,8 +12,8 @@
 class filelog(revlog):
     def __init__(self, opener, path, defversion=REVLOG_DEFAULT_VERSION):
         revlog.__init__(self, opener,
-                        os.path.join("data", self.encodedir(path + ".i")),
-                        os.path.join("data", self.encodedir(path + ".d")),
+                        "/".join(("data", self.encodedir(path + ".i"))),
+                        "/".join(("data", self.encodedir(path + ".d"))),
                         defversion)
 
     # This avoids a collision between a file named foo and a dir named
--- a/mercurial/statichttprepo.py	Tue Dec 05 15:21:41 2006 +0100
+++ b/mercurial/statichttprepo.py	Tue Dec 05 16:33:40 2006 +0100
@@ -25,7 +25,7 @@
     """return a function that opens files over http"""
     p = base
     def o(path, mode="r"):
-        f = os.path.join(p, urllib.quote(path))
+        f = "/".join((p, urllib.quote(path)))
         return rangereader(f)
     return o