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
Branch
fix-from-disk-usage
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 10810
Build 16234: Cypress tests for swh-web diffsJenkins
Build 16233: tox-on-jenkinsJenkins
Build 16232: arc lint + arc unit

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.