Page MenuHomeSoftware Heritage

Refactor and fix the iterate_statuses function
ClosedPublic

Authored by douardda on Feb 17 2021, 5:37 PM.

Details

Summary
  • do not yield OriginEntry objects if the visit status has no snapshot
  • use set() as intermediate structures to prevent adding the same revision twice

And add simple tests for the ArchiveOriginIterator class (which is an
inderect test for this iterate_statuses() function, really).

Depends on D5100.

Diff Detail

Repository
rDPROV Provenance database
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

douardda created this revision.
aeviso added a subscriber: aeviso.

OK about this refactoring, although this will probably change in the future. I think we actually want to receive the status or status visit as parameter, not the origins themselves.

This revision is now accepted and ready to land.Feb 18 2021, 1:50 PM