Page MenuHomeSoftware Heritage

Move parts of _load_revision to a new _load_directory method.
ClosedPublic

Authored by vlorentz on Aug 14 2020, 6:10 PM.

Details

Reviewers
anlambert
Group Reviewers
Reviewers
Summary

It makes the function less big, and a future commit's tests will need to
override _load_directory to test the rest of _load_revision.

Event Timeline

Build is green

Patch application report for D3797 (id=13379)

Could not rebase; Attempt merge onto 2423266fbb...

Auto-merging swh/loader/package/loader.py
Merge made by the 'recursive' strategy.
 swh/loader/package/loader.py                     | 43 +++++++++++++-----------
 swh/loader/package/tests/test_loader_metadata.py |  8 +++--
 2 files changed, 29 insertions(+), 22 deletions(-)
Changes applied before test
commit ebfe0a014c07bf1f338338abe67d5c9e506e1763
Merge: 2423266 7d567d6
Author: Jenkins user <jenkins@localhost>
Date:   Fri Aug 14 16:11:11 2020 +0000

    Merge branch 'diff-target' into HEAD

commit 7d567d6bb81675fa1829e2635d3c45fc2366da56
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 14 18:10:04 2020 +0200

    Move parts of _load_revision to a new _load_directory method.
    
    It makes the function less big, and a future commit's tests will need to
    override _load_directory to test the rest of _load_revision.

commit 500a42a143d180680e483e5c6a27bebb60a8add1
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 14 17:40:33 2020 +0200

    tests: Don't use naive datetimes.
    
    This is incorrect, and will become an error with the next version of swh-model.

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

This revision is now accepted and ready to land.Aug 17 2020, 12:03 PM

Build is green

Patch application report for D3797 (id=13388)

Rebasing onto 504ef6938e...

Current branch diff-target is up to date.
Changes applied before test
commit 5ea22d224fa8b51711e19a9366fc0f51b4d3d35c
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Fri Aug 14 18:10:04 2020 +0200

    Move parts of _load_revision to a new _load_directory method.
    
    It makes the function less big, and a future commit's tests will need to
    override _load_directory to test the rest of _load_revision.

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

5ea22d224fa8b51711e19a9366fc0f51b4d3d35c