[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: Роман Донченко <DXDragon_at_yandex.ru>
Date: Sun, 12 Jul 2009 02:42:14 +0400

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.

Roman.

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2370706
Received on 2009-07-12 00:42:58 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.