[PATCH] Fix for Issue1260
Adrian Buehlmann
adrian at cadifra.com
Fri Aug 15 10:26:04 CDT 2008
On 15.08.2008 16:53, Frank Kingswood wrote:
> Adrian Buehlmann wrote:
>> # HG changeset patch
>> # User Adrian Buehlmann <adrian at cadifra.com>
>> # Date 1218803955 -7200
>> # Node ID fcb89cadd5530f8d680b8bca9235d5bc9f3f4fd5
>> # Parent 438e02b4be73ffd80d4a6cc45b7c9273d6b26604
>> Fix for Issue1260
>>
>> diff --git a/mercurial/statichttprepo.py b/mercurial/statichttprepo.py
>> --- a/mercurial/statichttprepo.py
>> +++ b/mercurial/statichttprepo.py
>> @@ -24,7 +24,7 @@
>>
>> def opener(base):
>> """return a function that opens files over http"""
>> - p = base
>> + p = base.replace('\\', '/')
>> def o(path, mode="r"):
>> f = "/".join((p, urllib.quote(path)))
>> return rangereader(f)
>
> This seems the wrong place to handle this. Shouldn't the callers be
> fixed instead, so that statichttprepo gets valid URLs?
>
> If the user of statichttprepo calls os.path.join() with an argument that
> is not an OS path, then *it* is plain wrong, not statichttprepo.
>
> Frank
See http://www.selenic.com/mercurial/bts/issue1260
It's just the tail of a much longer story.
More information about the Mercurial-devel
mailing list