Page MenuHomeSoftware Heritage

Refactor the FileRevisionIterator
ClosedPublic

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

Details

Summary
  • rename it as CSVRevisionIterator
  • make it take an iterable as input instead of a file name
  • make it a true iterator (iter)
  • refactor the main method to simplify it

The expected input iterable should generate 3-tuples, corresponding the
the 3 columns of the originally expected CSV file (revision sha1, date,
directory sha1).

This makes the class much easier to test.

Depends on D5099.

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.