Page MenuHomeSoftware Heritage

Fix Directory.from_disk usage
ClosedPublic

Authored by anlambert on Feb 28 2020, 3:30 PM.

Details

Summary

swh.model.from_disk.Directory.from_disk signature and usage have changed
since rDMOD6da524cb2bd8b870eaa0be477837694617cfff1b.

Diff Detail

Repository
rDWAPPS Web applications
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

This revision is now accepted and ready to land.Feb 28 2020, 4:21 PM

Note that this now only works if the directory is flat (no subdirectories): directory.collect() did a recursive traversal, while directory.items() only walks a single level.

In D2732#65258, @olasd wrote:

Note that this now only works if the directory is flat (no subdirectories): directory.collect() did a recursive traversal, while directory.items() only walks a single level.

Yes I noticed the difference of behavior. Hopefully, I only load flat directories here.