Page MenuHomeSoftware Heritage

Refactor and fix the iterate_statuses function

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


  • 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

R222 Provenance database
Automatic diff as part of commit; lint not applicable.
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.Thu, Feb 18, 1:50 PM