Page MenuHomeSoftware Heritage

browse: Handle snapshots whose branches target contents or directories
ClosedPublic

Authored by anlambert on Nov 3 2022, 5:16 PM.

Details

Summary

Previously swh-web was only supporting the browsing of snapshot branches
targeting revisions but we recently introduced new Software Heritage
loaders producing snapshots whose branches target contents or directories
but no revisions.

So add support to browse such snapshots as previously they were flagged as
empty when trying to display them.

Related to T4669

This is the first part for properly supporting the browsing of such snapshots
in swh-web.

The second diff on the subject will update the view for browsing the branches
list of a snapshot by adding the target type of each branch (as in the releases
list view) and generating proper links to browse those targetting contents or
directories.

Diff Detail

Repository
rDWAPPS Web applications
Branch
snapshot-no-revision-branches-display
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 32700
Build 51230: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 51229: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D8807 (id=31737)

Rebasing onto d055e08d8b...

Current branch diff-target is up to date.
Changes applied before test
commit c2a1e4fb3638c5eadb131c3b3b1598705af71507
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Nov 2 15:52:59 2022 +0100

    browse: Handle snapshots whose branches target contents or directories
    
    Previously swh-web was only supporting the browsing of snapshot branches
    targeting revisions but we recently introduced new Software Heritage
    loaders producing snapshots whose branches target contents or directories
    but no revisions.
    
    So add support to browse such snapshots as previously they were flagged as
    empty when trying to display them.
    
    Related to T4669

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

This revision is now accepted and ready to land.Nov 4 2022, 9:15 AM

Fix content or directory branch browsing when the branch query parameter
is passed to the directory browsing view and update tests to cover that
case.

Build is green

Patch application report for D8807 (id=31745)

Rebasing onto d055e08d8b...

Current branch diff-target is up to date.
Changes applied before test
commit 8f594ec2b6e2e60d49a53fc9ed72d1f3607d1a10
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Nov 2 15:52:59 2022 +0100

    browse: Handle snapshots whose branches target contents or directories
    
    Previously swh-web was only supporting the browsing of snapshot branches
    targeting revisions but we recently introduced new Software Heritage
    loaders producing snapshots whose branches target contents or directories
    but no revisions.
    
    So add support to browse such snapshots as previously they were flagged as
    empty when trying to display them.
    
    Related to T4669

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