Page MenuHomeSoftware Heritage

utils: Add missing relative URL detection in parse_external_definition
ClosedPublic

Authored by anlambert on Apr 21 2022, 10:41 AM.

Details

Summary

External URL definition starting with "^/" can lead to URL not starting
with the repository one so handle that case.

Spotted in this sentry issue for origin https://svn.code.sf.net/p/svncmd/scripts.

swh-loader_1                        | [2022-04-20 13:55:30,916: DEBUG/ForkPoolWorker-1] Setting 'svn:externals' property with value '^/../../contools/external_tools/trunk/scm/svn scm/svn
swh-loader_1                        | ^/../../contools/external_tools/trunk/python python
swh-loader_1                        | ^/../../contools/external_tools/trunk/deps deps
swh-loader_1                        | ' on path b'trunk/ToolsExternal'
swh-loader_1                        | [2022-04-20 13:55:30,974: DEBUG/ForkPoolWorker-1] Exporting external http://svn.code.sf.net/p/contools/external_tools/trunk/scm/svn to path b'trunk/ToolsExternal/scm/svn'
swh-loader_1                        | [2022-04-20 13:55:30,975: DEBUG/ForkPoolWorker-1] svn export --depth infinity --ignore-keywords http://svn.code.sf.net/p/contools/external_tools/trunk/scm/svn b'/tmp/swh.loader.svn.ncqn5rfu-127/tmpc7c5vn6j/tmpveju6ru3/scm/svn'
swh-loader_1                        | [2022-04-20 13:58:03,374: DEBUG/ForkPoolWorker-1] Exporting external http://svn.code.sf.net/p/contools/external_tools/trunk/python to path b'trunk/ToolsExternal/python'
swh-loader_1                        | [2022-04-20 13:58:03,374: DEBUG/ForkPoolWorker-1] svn export --depth infinity --ignore-keywords http://svn.code.sf.net/p/contools/external_tools/trunk/python b'/tmp/swh.loader.svn.ncqn5rfu-127/tmpc7c5vn6j/tmpp7ne_60p/python'
swh-loader_1                        | [2022-04-20 13:58:16,307: DEBUG/ForkPoolWorker-1] Exporting external http://svn.code.sf.net/p/contools/external_tools/trunk/deps to path b'trunk/ToolsExternal/deps'
swh-loader_1                        | [2022-04-20 13:58:16,308: DEBUG/ForkPoolWorker-1] svn export --depth infinity --ignore-keywords http://svn.code.sf.net/p/contools/external_tools/trunk/deps b'/tmp/swh.loader.svn.ncqn5rfu-127/tmpc7c5vn6j/tmp_ybbojd3/deps'

Diff Detail

Repository
rDLDSVN Subversion (SVN) loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D7616 (id=27587)

Rebasing onto 821a51307a...

First, rewinding head to replay your work on top of it...
Applying: utils: Add missing relative URL detection in parse_external_definition
Changes applied before test
commit 4d58eacd8066052bfe0515bdcb2d9bd240540ad4
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Apr 20 17:37:46 2022 +0200

    utils: Add missing relative URL detection in parse_external_definition
    
    External URL definition starting with "^/" can lead to URL not starting
    with the repository one so handle that case.

See https://jenkins.softwareheritage.org/job/DLDSVN/job/tests-on-diff/316/ for more details.

This revision is now accepted and ready to land.Apr 21 2022, 11:10 AM

Build is green

Patch application report for D7616 (id=27588)

Rebasing onto 821a51307a...

Current branch diff-target is up to date.
Changes applied before test
commit 056dfe78046cc1fbec9c4fd0b7297f5e26e29888
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Apr 20 17:37:46 2022 +0200

    utils: Add missing relative URL detection in parse_external_definition
    
    External URL definition starting with "^/" can lead to URL not starting
    with the repository one so handle that case.

See https://jenkins.softwareheritage.org/job/DLDSVN/job/tests-on-diff/317/ for more details.