diff -r e0e5c1b9febd -r 6daf7757e92b mercurial/hg.py --- a/mercurial/hg.py Wed May 04 09:33:46 2005 -0800 +++ b/mercurial/hg.py Wed May 04 10:07:10 2005 -0800 @@ -6,6 +6,7 @@ # of the GNU General Public License, incorporated herein by reference. import sys, struct, sha, socket, os, time, base64, re, urllib2, binascii +import urllib from mercurial import byterange from mercurial.transaction import * from mercurial.revlog import * @@ -211,9 +212,11 @@ def opener(base): p = base def o(path, mode="r"): + if p[:7] == "http://": + f = os.path.join(p, urllib.quote(path)) + return httprangereader(f) + f = os.path.join(p, path) - if p[:7] == "http://": - return httprangereader(f) if mode != "r" and os.path.isfile(f): s = os.stat(f)