Skip to content
Snippets Groups Projects

Refactor common behavior between ContentLoader and *DirectoryLoader

All threads resolved!

(only the top-level commit, sharing the same title as this MR, is to be reviewed)

This renames the method fetch_directory introduced in [1] in fetch_artifact and move it in the NodeLoader base class (common mother class of ContentLoader and DirectoryLoader). This adds a new abstract method compute_artifact too which computes the DAG objects out of the artifact_path retrieved in the fetch_artifact method.

This reworks the ContentLoader's fetch_data into a simpler fetch_artifact and add the compute_artifact implementation. This also reworks the DirectoryLoader to drop the fetch_data and just provide the compute_artifact part. Finally, this renames the fetch_directory in TarballDirectoryLoader to fetch_artifact.

There is now no more duplication between all those classes mentioned above.

Thougths?

[1] Depends on !469 (merged)

Refs. swh/meta#4979 (closed)

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Antoine Lambert approved this merge request

    approved this merge request

  • added 1 commit

    • abe741a9 - Refactor common behavior between ContentLoader and *DirectoryLoader

    Compare with previous version

  • Antoine R. Dumont resolved all threads

    resolved all threads

  • Please register or sign in to reply
    Loading