On Mon, Oct 9, 2023 at 5:05 AM Daniel Sahlberg <daniel.l.sahlb...@gmail.com>
wrote:

> Den mån 9 okt. 2023 kl 10:30 skrev Yasuhito FUTATSUKI <
> futat...@yf.bsdclub.org>:
>
>>
>>
>> On 2023/10/09 4:14, Daniel Sahlberg wrote:
>> > Den lör 7 okt. 2023 kl 06:52 skrev Yasuhito FUTATSUKI <
>> > futat...@yf.bsdclub.org>:
>>
>> >> If svn is called with relative paths, it can only see
>> >> cwd as a realpath, and absolute paths of argment paths
>> >> are composed from it.  So the paths in error message we
>> >> can expect here is absolute real paths or relative paths
>> >> only (It assumes that relative paths passed from the
>> >> command line don't contain symlinks).
>>
>> > I was able to reproduce the issue and thanks to Yasuhito's hints I was
>> also
>> > able to fix it by using absolute paths when running the svn command.
>> I've
>> > committed r1912826 with a simple fix which seems to work for me.
>>
>> I don't think r1912826 is a correct fix. For the main purpose of
>> the test, checking SVN-4913 is surely fixed, it is correct,
>> but then how the error message should be when the arguments are
>> passed in the form of relative paths ?
>>
>
> Just so I understand your question, are you asking what the ACTUAL error
> message should be when passed a relative path (which may contain a symlink)?
>
> If this is the question, then it goes deep within the library where the
> relative path is resolved to an absolute path. The error message has always
> returned the absolute path (libsvn_client/copy.c, approx 3100). Maybe it
> would have been better to return a path relative to the wc root?
>
> Kind regards,
> Daniel
>

When I was studying other tests, some of them used a regex to match
anything in the first portion of the string. So if the path is $WC/A/B, the
expected_error contains something like '.*/A/B'. I think this is one of the
things I experimented with in my earlier attempts, but I may have
overlooked something because the test was still failing for me.

I'm away from my computer at the moment but I can follow-up with a few
examples elsewhere in the test suite. (You can also find them pretty easily
by grepping for expected_error and looking for messages that contain wc
paths.)

Cheers,
Nathan

Reply via email to