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

Re: svn commit: r39219 - trunk/subversion/libsvn_subr

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 21 Sep 2009 09:43:00 -0400

Joe Swatosh wrote:
> On Thu, Sep 10, 2009 at 7:32 AM, C. Michael Pilato <cmpilato_at_collab.net> wrote:
>> Author: cmpilato
>> Date: Thu Sep 10 07:32:11 2009
>> New Revision: 39219

[...]

> This commit started a Ruby bindings failure. Here is the relevant
> scrap of test code
> (I hope this is clear enough to anyone who is not familiar with Ruby,
> if not please ask):
>
> def test_mime_type_detect_with_type_map
> type_map = {
> "html" => "text/html",
> "htm" => "text/html",
> "png" => "image/png",
> }
>
> nonexistent_html_file = File.join(@tmp_path, "nonexistent.html")
> assert_raises(Svn::Error::BadFilename) do
> Svn::Core::MimeType.detect(nonexistent_html_file)
> end
> assert_raises(Svn::Error::BadFilename) do
> Svn::Core::MimeType.detect(nonexistent_html_file, type_map) ###
> end
>
> The second call to Svn::Core::MimeType.detect is no longer raising (marked
> ### above). I wonder if changing the placement of the block that checks for
> existence is the culprit? Or if this was an expected change, I will of course
> update the test.

Sorry about the build breakage. I'm reasonably confident that relocating
that existence check is, in fact, the culprit. That said, I'm also
reasonably confident that it was a fair change to make, offering a small
performance benefit in the majority of cases where it is used with a MIME
mapping. I could probably be convinced otherwise, though.

-- 
C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2397466

Received on 2009-09-21 15:43: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.