Show More
@@ -6,6 +6,7 b'' | |||||
6 | # of the GNU General Public License, incorporated herein by reference. |
|
6 | # of the GNU General Public License, incorporated herein by reference. | |
7 |
|
7 | |||
8 | import sys, struct, sha, socket, os, time, base64, re, urllib2, binascii |
|
8 | import sys, struct, sha, socket, os, time, base64, re, urllib2, binascii | |
|
9 | import urllib | |||
9 | from mercurial import byterange |
|
10 | from mercurial import byterange | |
10 | from mercurial.transaction import * |
|
11 | from mercurial.transaction import * | |
11 | from mercurial.revlog import * |
|
12 | from mercurial.revlog import * | |
@@ -211,9 +212,11 b' class dircache:' | |||||
211 | def opener(base): |
|
212 | def opener(base): | |
212 | p = base |
|
213 | p = base | |
213 | def o(path, mode="r"): |
|
214 | def o(path, mode="r"): | |
|
215 | if p[:7] == "http://": | |||
|
216 | f = os.path.join(p, urllib.quote(path)) | |||
|
217 | return httprangereader(f) | |||
|
218 | ||||
214 | f = os.path.join(p, path) |
|
219 | f = os.path.join(p, path) | |
215 | if p[:7] == "http://": |
|
|||
216 | return httprangereader(f) |
|
|||
217 |
|
220 | |||
218 | if mode != "r" and os.path.isfile(f): |
|
221 | if mode != "r" and os.path.isfile(f): | |
219 | s = os.stat(f) |
|
222 | s = os.stat(f) |
General Comments 0
You need to be logged in to leave comments.
Login now