You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Daniel Sahlberg <da...@gmail.com> on 2023/04/02 18:08:59 UTC

Re: redirection error with file externals - possible bug

I've spent some time today looking at the issue. I've been able to
reproduce it, but my reproduction is not in a shape where I can share it.

Basically I've setup a server where the repository was hosted at
http://localhost/repo, configured an external. Then reconfigured the server
so the repository is at http://localhost/r2 with http://localhost/repo
issuing a http level redirect to /r2.

I'm then able to reproduce the issue.

Den sön 12 mars 2023 kl 22:42 skrev Nathan Hartman <hartman.nathan@gmail.com
>:

> On Sat, Mar 11, 2023 at 4:29 PM Daniel Sahlberg <
> daniel.l.sahlberg@gmail.com> wrote:
>
>> Den lör 11 mars 2023 kl 13:06 skrev Pál Kovács <81...@gmail.com>:
>>
>>>
>>>
>>> Dear All,
>>>
>>> I'd like to setup http traffic to be redirected to https on our svn
>>> server.
>>> Redirection works all right in most of the cases, except when we have a
>>> file-external with http in the url.
>>> For file-externals, svn export works as expected (in the export log it
>>> is visible that there was a redirection and the file is fetched).
>>> However when trying to checkout a working copy, file-externals are not
>>> downloaded, the log shows errors like this:
>>>
>>> Redirecting to URL '
>>> https://myserver/svn/myrepo/TestFolder/Project2/test.txt':
>>> Fetching external item into 'checkout_target\test.txt':
>>> svn: warning: W200035: sqlite[S19]: NOT NULL constraint failed:
>>> EXTERNALS.def_repos_relpath
>>>
>>
This error occurs in subversion/libsvn_wc/wc_db.c line 3365 (as of
r1908925), where ieb->recorded_repos_relpath is null for a file external.
For a folder external, it contains the folder name.

I didn't check where recorded_repos_relpath came from but I think this is
the logical next step.


> I found a similar bug report for folder-externals, which was fixed in SVN
>>> 1.8.5
>>>
>>> https://issues.apache.org/jira/browse/SVN-4428
>>>
>>
I'm running out of time to check r1525902 (as referenced by this issue) but
maybe this problem was fixed for folders and a similar fix can be applied
also for files.

Kind regards,
Daniel Sahlberg

Re: redirection error with file externals - possible bug

Posted by Pál Kovács <81...@gmail.com>.
Hi,

Thank you for your help.
br,
Pal

On Sun, 2 Apr 2023, 22:26 Daniel Sahlberg, <da...@gmail.com>
wrote:

> Den sön 2 apr. 2023 kl 20:08 skrev Daniel Sahlberg <
> daniel.l.sahlberg@gmail.com>:
>
>> I've spent some time today looking at the issue. I've been able to
>> reproduce it, but my reproduction is not in a shape where I can share it.
>>
>> Basically I've setup a server where the repository was hosted at
>> http://localhost/repo, configured an external. Then reconfigured the
>> server so the repository is at http://localhost/r2 with
>> http://localhost/repo issuing a http level redirect to /r2.
>>
>> I'm then able to reproduce the issue.
>>
>> Den sön 12 mars 2023 kl 22:42 skrev Nathan Hartman <
>> hartman.nathan@gmail.com>:
>>
>>> On Sat, Mar 11, 2023 at 4:29 PM Daniel Sahlberg <
>>> daniel.l.sahlberg@gmail.com> wrote:
>>>
>>>> Den lör 11 mars 2023 kl 13:06 skrev Pál Kovács <81.kovacspal@gmail.com
>>>> >:
>>>>
>>>>>
>>>>>
>>>>> Dear All,
>>>>>
>>>>> I'd like to setup http traffic to be redirected to https on our svn
>>>>> server.
>>>>> Redirection works all right in most of the cases, except when we have
>>>>> a file-external with http in the url.
>>>>> For file-externals, svn export works as expected (in the export log it
>>>>> is visible that there was a redirection and the file is fetched).
>>>>> However when trying to checkout a working copy, file-externals are not
>>>>> downloaded, the log shows errors like this:
>>>>>
>>>>> Redirecting to URL '
>>>>> https://myserver/svn/myrepo/TestFolder/Project2/test.txt':
>>>>> Fetching external item into 'checkout_target\test.txt':
>>>>> svn: warning: W200035: sqlite[S19]: NOT NULL constraint failed:
>>>>> EXTERNALS.def_repos_relpath
>>>>>
>>>>
>> This error occurs in subversion/libsvn_wc/wc_db.c line 3365 (as of
>> r1908925), where ieb->recorded_repos_relpath is null for a file external.
>> For a folder external, it contains the folder name.
>>
>> I didn't check where recorded_repos_relpath came from but I think this is
>> the logical next step.
>>
>>
>>> I found a similar bug report for folder-externals, which was fixed in
>>>>> SVN 1.8.5
>>>>>
>>>>> https://issues.apache.org/jira/browse/SVN-4428
>>>>>
>>>>
>> I'm running out of time to check r1525902 (as referenced by this issue)
>> but maybe this problem was fixed for folders and a similar fix can be
>> applied also for files.
>>
>
> r1525902 indeed fixed the problem but only for directory externals. The
> same fix could be applied for file externals and I've committed a fix as
> r1908926.
>
> I will also nominate this fix for backport to 1.14.
>
> Kind regards,
> Daniel Sahlberg
>

Re: redirection error with file externals - possible bug

Posted by Daniel Sahlberg <da...@gmail.com>.
Den sön 2 apr. 2023 kl 20:08 skrev Daniel Sahlberg <
daniel.l.sahlberg@gmail.com>:

> I've spent some time today looking at the issue. I've been able to
> reproduce it, but my reproduction is not in a shape where I can share it.
>
> Basically I've setup a server where the repository was hosted at
> http://localhost/repo, configured an external. Then reconfigured the
> server so the repository is at http://localhost/r2 with
> http://localhost/repo issuing a http level redirect to /r2.
>
> I'm then able to reproduce the issue.
>
> Den sön 12 mars 2023 kl 22:42 skrev Nathan Hartman <
> hartman.nathan@gmail.com>:
>
>> On Sat, Mar 11, 2023 at 4:29 PM Daniel Sahlberg <
>> daniel.l.sahlberg@gmail.com> wrote:
>>
>>> Den lör 11 mars 2023 kl 13:06 skrev Pál Kovács <81...@gmail.com>:
>>>
>>>>
>>>>
>>>> Dear All,
>>>>
>>>> I'd like to setup http traffic to be redirected to https on our svn
>>>> server.
>>>> Redirection works all right in most of the cases, except when we have a
>>>> file-external with http in the url.
>>>> For file-externals, svn export works as expected (in the export log it
>>>> is visible that there was a redirection and the file is fetched).
>>>> However when trying to checkout a working copy, file-externals are not
>>>> downloaded, the log shows errors like this:
>>>>
>>>> Redirecting to URL '
>>>> https://myserver/svn/myrepo/TestFolder/Project2/test.txt':
>>>> Fetching external item into 'checkout_target\test.txt':
>>>> svn: warning: W200035: sqlite[S19]: NOT NULL constraint failed:
>>>> EXTERNALS.def_repos_relpath
>>>>
>>>
> This error occurs in subversion/libsvn_wc/wc_db.c line 3365 (as of
> r1908925), where ieb->recorded_repos_relpath is null for a file external.
> For a folder external, it contains the folder name.
>
> I didn't check where recorded_repos_relpath came from but I think this is
> the logical next step.
>
>
>> I found a similar bug report for folder-externals, which was fixed in SVN
>>>> 1.8.5
>>>>
>>>> https://issues.apache.org/jira/browse/SVN-4428
>>>>
>>>
> I'm running out of time to check r1525902 (as referenced by this issue)
> but maybe this problem was fixed for folders and a similar fix can be
> applied also for files.
>

r1525902 indeed fixed the problem but only for directory externals. The
same fix could be applied for file externals and I've committed a fix as
r1908926.

I will also nominate this fix for backport to 1.14.

Kind regards,
Daniel Sahlberg