Page MenuHomeSoftware Heritage

utils: Handle new edge cases in parse_external_definition
ClosedPublic

Authored by anlambert on Jan 21 2022, 3:38 PM.

Details

Summary

Detect malformed URLs with missing colon.

Remove any trailing slash on path as it can lead to errors with the
swh.model.from_disk.Directory model.

Related to T3870

Fixes SWH-LOADER-SVN-50 and SWH-LOADER-SVN-58.

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 D7013 (id=25424)

Rebasing onto 11740ebc29...

Current branch diff-target is up to date.
Changes applied before test
commit ae79611ae18f910714ae7fb586ed1b9340f8672a
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Jan 21 15:32:51 2022 +0100

    utils: Handle new edge cases in parse_external_definition
    
    Detect malformed URLs with missing colon.
    
    Remove any trailing slash on path as it can lead to errors with the
    swh.model.from_disk.Directory model.
    
    Related to T3870

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

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/loader/svn/utils.py
256

should be equivalent

This revision is now accepted and ready to land.Jan 21 2022, 4:05 PM

Build is green

Patch application report for D7013 (id=25429)

Rebasing onto 11740ebc29...

Current branch diff-target is up to date.
Changes applied before test
commit e6e733005d126296f6ce51e4f08a19ff729b5d01
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Jan 21 15:32:51 2022 +0100

    utils: Handle new edge cases in parse_external_definition
    
    Detect malformed URLs with missing colon.
    
    Remove any trailing slash on path as it can lead to errors with the
    swh.model.from_disk.Directory model.
    
    Related to T3870

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