[PATCH 3 of 5 STABLE] statichttprepo: add join method to opener

Idan Kamara idankk86 at gmail.com
Tue Feb 28 15:53:34 UTC 2012


# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1330444189 -7200
# Branch stable
# Node ID 95d905db80146843351276785452a21af474315d
# Parent  7b3a99ee65dc51231a484e9db216904c5fa0b49a
statichttprepo: add join method to opener

diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py
--- a/mercurial/statichttprepo.py
+++ b/mercurial/statichttprepo.py
@@ -70,8 +70,10 @@
         def __call__(self, path, mode="r", atomictemp=None):
             if mode not in ('r', 'rb'):
                 raise IOError('Permission denied')
-            f = "/".join((self.base, urllib.quote(path)))
-            return httprangereader(f, urlopener)
+            return httprangereader(self.join(path), urlopener)
+
+        def join(self, path):
+            return "/".join((self.base, urllib.quote(path)))
 
     return statichttpopener
 



More information about the Mercurial-devel mailing list