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

Re: [PATCH] Fix python wc testcase failure

From: Hyrum K. Wright <hyrum_at_hyrumwright.org>
Date: Wed, 15 Jul 2009 15:15:00 -0600

On Jul 11, 2009, at 4:42 PM, Роман Донченко wrote:

> Jens Peters <jpeters7677_at_gmx.de> писал в своём
> письме Sun, 05 Jul 2009
> 23:49:41 +0400:
>
>> Any thoughts?
>
> I analyzed this and I agree with you.
>
> It all really boils down to the following line in the function
> close_edit
> in status.c:
>
> const char *full_path = svn_path_join(eb->anchor, eb->target, pool);
>
> The way the test creates the status editor, both anchor and target are
> absolute paths to some temporary directory.
>
> On Unix-likes, it's something like '/tmp/abcd123'; due to the way
> svn_path_join operates, full_path becomes equal to '/tmp/abcd123',
> which
> is correct. On Windows, it's something like 'C:\Temp\abcd123', and
> full_path becomes 'C:\Temp\abcd123\C:\Temp\abcd123', which is
> obviously
> wrong. As such, the test passed on Unixes when it was written (and
> presumably still does), yet fails on Windows (and presumably did
> earlier).
>
> Short version: it has nothing to do with backwards compatibility, +1
> on
> your patch.
>
> Interestingly enough, on trunk the test succeeds; it happens because
> on
> that line svn_path_join was replaced with svn_dirent_join, which
> does the
> right thing for Windows paths too. However the doc for
> svn_wc_get_status_editor5 weakly implies that target should be a
> relative
> path, so the test still violates the contract.

In 1.7, *all* working copy APIs will state explicitly they require
absolute paths. Hopefully, this will fix problems and confusion like
this.

-Hyrum

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2371628
Received on 2009-07-16 01:30:46 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.