Page MenuHomeSoftware Heritage

browse: Fix issues when context is a release targeting a directory
ClosedPublic

Authored by anlambert on Dec 1 2021, 2:37 PM.

Details

Summary

When browsing contents or directories in the context of a release
targeting a directory, there will be no revision identifier involved
in the snapshot context.

This was causing HTTP errors 500 when a staff user was logged in
and an empty revision tab was displayed in the Permalinks dialog
for all users.

Diff Detail

Repository
rDWAPPS Web applications
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 D6711 (id=24385)

Rebasing onto 3ff49a05ce...

Current branch diff-target is up to date.
Changes applied before test
commit 5d3515436646356ea91df5e3af085c1c25516640
Author: Antoine Lambert <anlambert@softwareheritage.org>
Date:   Wed Dec 1 14:31:42 2021 +0100

    browse: Fix issues when context is a release targeting a directory
    
    When browsing contents or directories in the context of a release
    targeting a directory, there will be no revision identifier involved
    in the snapshot context.
    
    This was causing HTTP errors 500 when a staff user was logged in
    and an empty revision tab was displayed in the Permalinks dialog
    for all users.

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

This revision is now accepted and ready to land.Dec 1 2021, 3:55 PM