Page MenuHomeSoftware Heritage

svn: Add support to basic subversion authentication in SvnRepo
ClosedPublic

Authored by anlambert on Sep 30 2022, 2:13 PM.

Details

Summary

Some subversion servers in the wild disabled anonymous access and require
to authenticate using a read only user account, typically with credentials
anonymous/anonymous.

So add support for basic authentication in the subversion loader, credentials
must be provided in the repository URL as with basic HTTP authentication.

Such repository has been submitted to Save Code Now service: https://anonymous@svn.cryptool.org/CrypTool1/

Diff Detail

Repository
rDLDSVN Subversion (SVN) loader
Branch
svn-add-basic-auth-support
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 31964
Build 50032: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 50031: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D8585 (id=30990)

Rebasing onto 651e2964ee...

Current branch diff-target is up to date.
Changes applied before test
commit 2247374a63c8437c2fc40a0d3ac0eda8f2bae7a6
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Sep 30 13:25:05 2022 +0200

    svn: Add support to basic subversion authentication in SvnRepo
    
    Some subversion servers in the wild disabled anonymous access and require
    to authenticate using a read only user account, typically with credentials
    anonymous/anonymous.
    
    So add support for basic authentication in the subversion loader, credentials
    must be provided in the repository URL as with basic HTTP authentication.

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

vlorentz added a subscriber: vlorentz.

thx

swh/loader/svn/loader.py
675–680
swh/loader/svn/tests/test_loader.py
2134–2150

add some indent to the string's content, since you're already using textwrap

This revision is now accepted and ready to land.Sep 30 2022, 2:30 PM

Build is green

Patch application report for D8585 (id=30994)

Rebasing onto 651e2964ee...

Current branch diff-target is up to date.
Changes applied before test
commit 8e735c953ba594373dbcbed407ff1c2204ee8866
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Sep 30 13:25:05 2022 +0200

    svn: Add support to basic subversion authentication in SvnRepo
    
    Some subversion servers in the wild disabled anonymous access and require
    to authenticate using a read only user account, typically with credentials
    anonymous/anonymous.
    
    So add support for basic authentication in the subversion loader, credentials
    must be provided in the repository URL as with basic HTTP authentication.

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