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

Re: svn commit: r39717 - trunk/subversion/bindings/swig/python/tests

From: Roman Donchenko <DXDragon_at_yandex.ru>
Date: Wed, 30 Sep 2009 23:40:45 +0400

Bert Huijben <rhuijben_at_sharpsvn.net> писал в своём письме Wed, 30 Sep 2009
23:02:06 +0400:

>> -----Original Message-----
>> From: Stefan Sperling [mailto:stsp_at_elego.de]
>> Sent: woensdag 30 september 2009 20:38
>> To: dev_at_subversion.tigris.org
>> Subject: Re: svn commit: r39717 -
>> trunk/subversion/bindings/swig/python/tests
>>
>> On Wed, Sep 30, 2009 at 11:26:31AM -0700, Roman Donchenko wrote:
>> > Author: rdonch
>> > Date: Wed Sep 30 11:26:31 2009
>> > New Revision: 39717
>> >
>> > Log:
>> > In the svn-python testsuite, use the svn_dirent functions instead of
>> the
>> > svn_path ones, and internal_style instead of canonicalize.
>> > Besides getting rid of deprecated function calls, this also fixes
>> several WC
>> > testcases that were failing on Windows.
>>
>>
>> > --- trunk/subversion/bindings/swig/python/tests/wc.py Wed Sep 30
>> 10:57:51 2009 (r39716)
>> > +++ trunk/subversion/bindings/swig/python/tests/wc.py Wed Sep 30
>> 11:26:31 2009 (r39717)
>> > @@ -29,7 +29,7 @@ class SubversionWorkingCopyTestCase(unit
>> > self.repos = repos.open(REPOS_PATH)
>> > self.fs = repos.fs(self.repos)
>> >
>> > - self.path = core.svn_path_canonicalize(tempfile.mktemp())
>> > + self.path = core.svn_dirent_internal_style(tempfile.mktemp())
>>
>> Why not use svn_dirent_canonicalize() here?
>
> Probably because _internal_style() is for converting OS-style paths (e.g.
> converting \ to / on Windows), and canonicalize() is only for collapsing
> invalid sequences. (e.g. dir/./file to dir/file).
>
> svn_(dirent|uri|relpath)_internal_style() does this platform specific
> work
> and the canonicalization.

Exactly. The test failures I mention were specifically due to
canonicalize() doing nothing for native Windows paths.

Roman.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2402255
Received on 2009-09-30 21:41:27 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.