Mercurial > hg > mercurial-crew-with-dirclash
comparison mercurial/util.py @ 1101:2cf5c8a4eae5
Separate out old-http support
- create new statichttprepo class
- pull remote bits out of localrepo
- pull remote bits out of util.opener
- switch hg.repository to use statichttprepo
author | mpm@selenic.com |
---|---|
date | Sat, 27 Aug 2005 16:28:53 -0700 |
parents | 1bca39b85615 |
children | c81d264cd17d |
comparison
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": |