Staging instance, all changes can be removed at any time

Skip to content

storage: Make origin_get_latest_visit_status return OriginVisitStatus

This returned a Tuple[OriginVisit, OriginVisitStatus].

This was required to have the missing information "type" for visit-status. This is no longer needed as now OriginVisitStatus holds such type information.

Impacts foreseen [1]:

$SWH_ENV_HOME/swh-indexer/swh/indexer/origin_head.py:from swh.storage.algos.origin import origin_get_latest_visit_status
$SWH_ENV_HOME/swh-indexer/swh/indexer/origin_head.py:        visit_and_status = origin_get_latest_visit_status(
$SWH_ENV_HOME/swh-loader-core/swh/loader/tests/__init__.py:from swh.storage.algos.origin import origin_get_latest_visit_status
$SWH_ENV_HOME/swh-loader-core/swh/loader/tests/__init__.py:    visit_and_status = origin_get_latest_visit_status(storage, url)
$SWH_ENV_HOME/swh-loader-core/swh/loader/tests/test_init.py:    mock_storage = mocker.patch("swh.loader.tests.origin_get_latest_visit_status")
$SWH_ENV_HOME/swh-loader-core/swh/loader/package/nixguix/tests/test_nixguix.py:from swh.storage.algos.origin import origin_get_latest_visit_status
$SWH_ENV_HOME/swh-loader-core/swh/loader/package/nixguix/tests/test_nixguix.py:    (_, visit_status) = origin_get_latest_visit_status(loader.storage, sources_url)
$SWH_ENV_HOME/swh-loader-git/swh/loader/git/from_disk.py:from swh.storage.algos.origin import origin_get_latest_visit_status
$SWH_ENV_HOME/swh-loader-git/swh/loader/git/from_disk.py:        visit_and_status = origin_get_latest_visit_status(
$SWH_ENV_HOME/swh-loader-mercurial/swh/loader/mercurial/loader.py:from swh.storage.algos.origin import origin_get_latest_visit_status
$SWH_ENV_HOME/swh-loader-mercurial/swh/loader/mercurial/loader.py:        visit_and_status = origin_get_latest_visit_status(
$SWH_ENV_HOME/swh-web/swh/web/common/archive.py:from swh.storage.algos.origin import origin_get_latest_visit_status
$SWH_ENV_HOME/swh-web/swh/web/common/archive.py:    visit_and_status = origin_get_latest_visit_status(
$SWH_ENV_HOME/swh-web/swh/web/tests/conftest.py:from swh.storage.algos.origin import origin_get_latest_visit_status
$SWH_ENV_HOME/swh-web/swh/web/tests/conftest.py:        visit_and_status = origin_get_latest_visit_status(

Migrated from D4976 (view on Phabricator)

Merge request reports

Loading