Page MenuHomeSoftware Heritage

Update the revision metadata field as an immutable dict
ClosedPublic

Authored by ardumont on Jul 8 2020, 6:12 PM.

Details

Summary

If that makes sense.

Either that or we need to push down the original_artifact part into the
different package loader implementations.

Fix build [1]

[1] https://jenkins.softwareheritage.org/job/DLDBASE/job/tests/919/console

Test Plan

tox

Diff Detail

Repository
rDLDBASE Generic VCS/Package 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 D3471 (id=12273)

Rebasing onto 488b515a1c...

Current branch diff-target is up to date.
Changes applied before test
commit 8762b61d6a3c06058a2fc3e1b8b8279ffe79556a
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 8 18:10:00 2020 +0200

    Update the revision metadata field as an immutable dict
    
    Fix build [1]
    
    [1] https://jenkins.softwareheritage.org/job/DLDBASE/job/tests/919/console

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

vlorentz added inline comments.
swh/loader/package/loader.py
430–432

Replace these three lines with:

full_metadata = list(revision.metadata.items()) + [extra_metadata]

it's shorter and spares a copy

This revision is now accepted and ready to land.Jul 8 2020, 6:22 PM
swh/loader/package/loader.py
430–432

+1 ;)

Build is green

Patch application report for D3471 (id=12277)

Rebasing onto 488b515a1c...

Current branch diff-target is up to date.
Changes applied before test
commit 6dc3da1580d9d35cc9e7478f134b5246e058dc78
Author: Antoine R. Dumont (@ardumont) <ardumont@softwareheritage.org>
Date:   Wed Jul 8 18:10:00 2020 +0200

    Update the revision metadata field as an immutable dict
    
    Fix build [1]
    
    [1] https://jenkins.softwareheritage.org/job/DLDBASE/job/tests/919/console

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