Add Fixer class, which re-loads corrupt objects from origins
This is heavily inspired by https://archive.softwareheritage.org/swh:1:cnt:c6dda7698c6aecf71f744e4e4c01bc3e115db880;origin=https://forge.softwareheritage.org/source/snippets.git;visit=swh:1:snp:c2e3170b9927f3d356e120546b00f5a9d25a224c;anchor=swh:1:rev:fa9e387ba5e3470b93a5c5a8773ed598ef03d211;path=/vlorentz/analyze_consistency_failures.py but reorganized to the database instead of ad-hoc text and pickle files. Currently, this only implements recovering from Git origins.
Showing
- mypy.ini 4 additions, 0 deletionsmypy.ini
- requirements-swh.txt 1 addition, 0 deletionsrequirements-swh.txt
- swh/scrubber/cli.py 23 additions, 0 deletionsswh/scrubber/cli.py
- swh/scrubber/db.py 174 additions, 23 deletionsswh/scrubber/db.py
- swh/scrubber/fixer.py 205 additions, 0 deletionsswh/scrubber/fixer.py
- swh/scrubber/origin_locator.py 5 additions, 1 deletionswh/scrubber/origin_locator.py
- swh/scrubber/sql/30-schema.sql 13 additions, 0 deletionsswh/scrubber/sql/30-schema.sql
- swh/scrubber/sql/60-indexes.sql 5 additions, 0 deletionsswh/scrubber/sql/60-indexes.sql
- swh/scrubber/tests/test_cli.py 19 additions, 0 deletionsswh/scrubber/tests/test_cli.py
- swh/scrubber/tests/test_fixer.py 331 additions, 0 deletionsswh/scrubber/tests/test_fixer.py
- swh/scrubber/utils.py 14 additions, 2 deletionsswh/scrubber/utils.py
Loading
Please register or sign in to comment