[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] to help benchmark.py run on windows

From: Greg Stein <gstein_at_gmail.com>
Date: Tue, 19 Apr 2011 13:07:38 -0400

On Tue, Apr 19, 2011 at 11:07, Stephen Butler <sbutler_at_elego.de> wrote:
>
> On Apr 19, 2011, at 15:32 , Neels Hofmeyr wrote:
>
>> On Mon, 2011-04-18 at 19:47 -0400, Greg Stein wrote:
>>> Applied in r1094816.
>>>
>>> On Mon, Apr 18, 2011 at 18:44, Greg Stein <gstein_at_gmail.com> wrote:
>>>> On Mon, Apr 18, 2011 at 07:04, Alan Wood <Alan.Wood_at_clear.net.nz> wrote:
>>>>> Hi devs,
>>>>> I have just been looking at running the benchmarks and have got to the stage where I can
>>>>> run it on windows.
>>>>>
>>>>> This attached patch fixes three issues with the script:
>>>>> 1) use of file:// when I'm sure that file:/// is correct from previous discussions on this list
>>
>> This particular change is not necessary -- code extract with
>> annotations:
>>
>> base = tempfile.mkdtemp()       #  base == '/tmp/dir123'
>> repos = j(base, 'repos')        #  repos == '/tmp/dir123/repos'
>> file_url = 'file://%s' % repos  #  file_url == 'file://' + '/tmp/...'
>>
>> With your change, file_url becomes file:////tmp/..., which is still
>> valid, but nonsense :)  (BTW, the script would not have worked if there
>> had been only two slashes.)
>
> On Windows, the path returned by mkdtemp() is something like
>
>  C:\users\billga~1\appdata\local\temp\tmpfoobar
>
> with no leading slash, so an extra slash makes the URL valid.
>
> The directory path could even have spaces in it, if the user wishes.
> For a geeky script like this, we don't have to be paranoid.

I reviewed that portion of Alan's patch and omitted, for the reasons
Neels stated, but I also think the following is valid:

file://C:/users/blah/blah/repos

Thus, I left out the introduction of a slash. Are you sure there is
supposed to be a third slash in there? My impression is that the
"third slash" is a result of the leading slash of an absolute path in
Unix. But for Windows, you start with the drive letter (tho you could
get a slash if you use a remote path).

Bert? Any insight here?

Cheers,
-g
Received on 2011-04-19 19:08:08 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.