You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Jens Peters <jp...@gmx.de> on 2009/07/05 19:49:41 UTC
Re: [PATCH] Fix python wc testcase failure
> Even the very first version of get_status_editor uses 'target' as
> argument
> (http://svn.collab.net/viewvc/svn/branches/1.0.x/subversion/include/svn_wc.h?revision=8524&view=markup,
> line 1174). But I do wonder as well how the testcase could ever pass.
>
> Just a shot in the dark, but it could pass on a linux box if self.path
> is './', not sure though...
Any thoughts?
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2368172
Re: [PATCH] Fix python wc testcase failure
Posted by "C. Michael Pilato" <cm...@collab.net>.
> In 1.7, *all* working copy APIs will state explicitly they require
> absolute paths. Hopefully, this will fix problems and confusion like
> this.
Awesome! This should remedy many of the Windows users' issues with paths
being too long on that platform. (Absolute paths can be 65k long or so;
relative ones only 255 characters or so.)
--
C. Michael Pilato <cm...@collab.net>
CollabNet <> www.collab.net <> Distributed Development On Demand
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2371655
Re: [PATCH] Fix python wc testcase failure
Posted by "Hyrum K. Wright" <hy...@hyrumwright.org>.
On Jul 17, 2009, at 12:27 PM, Roman Donchenko wrote:
> Hyrum K. Wright <hy...@mail.utexas.edu> писал в
> своём письме Thu,
> 16 Jul 2009 01:15:00 +0400:
>
>> In 1.7, *all* working copy APIs will state explicitly they require
>> absolute paths. Hopefully, this will fix problems and confusion like
>> this.
>
> But svn_wc_get_status_editor5 is new to 1.7, yet it neither states,
> nor
> requires. Does that mean it's going to be rewritten?
Yes. At some point, the adm_access baton will be replaced with a
working copy context, and the path will be explicitly required to be
an absolute path.
-Hyrum
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2372145
Re: [PATCH] Fix python wc testcase failure
Posted by Roman Donchenko <DX...@yandex.ru>.
Hyrum K. Wright <hy...@mail.utexas.edu> писал в своём письме Thu,
16 Jul 2009 01:15:00 +0400:
> In 1.7, *all* working copy APIs will state explicitly they require
> absolute paths. Hopefully, this will fix problems and confusion like
> this.
But svn_wc_get_status_editor5 is new to 1.7, yet it neither states, nor
requires. Does that mean it's going to be rewritten?
Roman.
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=2372130
Re: [PATCH] Fix python wc testcase failure
Posted by "Hyrum K. Wright" <hy...@hyrumwright.org>.
On Jul 11, 2009, at 4:42 PM, Роман Донченко wrote:
> Jens Peters <jp...@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
Re: [PATCH] Fix python wc testcase failure
Posted by Роман Донченко <DX...@yandex.ru>.
Jens Peters <jp...@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