Staging instance, all changes can be removed at any time

Skip to content

origin_visits/get_origin_visit: Improve default visit picking strategy

When no visit info (timestamp, id or snapshot) is provided to that function return the last full visit with a valid snapshot or the last partial visit with a valid snapshot otherwise.

This fixes a browsing issue when an origin is no more available but swh keeps visiting it afterwards.

For instance the origin https://github.com/baifanwudi/PythonCode has been removed since the first swh visit. Currently, when trying to browse it, we get and empty snapshot view. After that change, the last full visit with non empty snapshot will be displayed instead.


Migrated from D3385 (view on Phabricator)

Merge request reports

Loading