Page MenuHomeSoftware Heritage

replay: Move external processing in a dedicated method
ClosedPublic

Authored by anlambert on Feb 4 2022, 2:10 PM.

Details

Summary

That code grew a lot so better putting it in a dedicated method, plus
it enables to remove one indentation level for better readability.

Depends on D7085

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 D7086 (id=25703)

Could not rebase; Attempt merge onto 09e83fd94c...

Updating 09e83fd..3187994
Fast-forward
 requirements-test.txt    |   2 +-
 swh/loader/svn/loader.py |   6 --
 swh/loader/svn/replay.py | 194 ++++++++++++++++++++++++-----------------------
 swh/loader/svn/svn.py    |   9 ++-
 4 files changed, 107 insertions(+), 104 deletions(-)
Changes applied before test
commit 31879947b413065447cc4a918497cb5ee948072c
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Feb 4 14:07:57 2022 +0100

    replay: Move external processing in a dedicated method
    
    That code grew a lot so better putting it in a dedicated method, plus
    it enables to remove one indentation level for better readability.

commit 369fbea00ea54b202a08db8541a7e6db42a0cc95
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Feb 4 13:48:00 2022 +0100

    svn: Add debug log before executing checkout or export operation

commit 8bde0663cb4a72a80212e7bab21a962ddf510e25
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Feb 4 13:40:52 2022 +0100

    requirements-test: Pin pytest to < 7.0.0
    
    pytest v7.0.0 removed _pytest.tmpdir.TempdirFactory, which is used
    by some of the pytest plugins we use.

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

I forgot to add typing, will update.

Build is green

Patch application report for D7086 (id=25704)

Could not rebase; Attempt merge onto 09e83fd94c...

Updating 09e83fd..d5bdea5
Fast-forward
 requirements-test.txt    |   2 +-
 swh/loader/svn/loader.py |   6 --
 swh/loader/svn/replay.py | 200 ++++++++++++++++++++++++-----------------------
 swh/loader/svn/svn.py    |   9 ++-
 4 files changed, 112 insertions(+), 105 deletions(-)
Changes applied before test
commit d5bdea55bc527a94d9e735648a2b835ea2510fba
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Feb 4 14:07:57 2022 +0100

    replay: Move external processing in a dedicated method
    
    That code grew a lot so better putting it in a dedicated method, plus
    it enables to remove one indentation level for better readability.

commit 369fbea00ea54b202a08db8541a7e6db42a0cc95
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Feb 4 13:48:00 2022 +0100

    svn: Add debug log before executing checkout or export operation

commit 8bde0663cb4a72a80212e7bab21a962ddf510e25
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Fri Feb 4 13:40:52 2022 +0100

    requirements-test: Pin pytest to < 7.0.0
    
    pytest v7.0.0 removed _pytest.tmpdir.TempdirFactory, which is used
    by some of the pytest plugins we use.

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

vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/loader/svn/replay.py
589–591

no need to materialize the list

This revision is now accepted and ready to land.Feb 4 2022, 5:39 PM
swh/loader/svn/replay.py
589–591

Ah right, will make the change in D7092 to avoid too much rebasing.