Page MenuHomeSoftware Heritage

RevisionVaultCooker: add naive flatten implementation
ClosedPublic

Authored by seirl on Feb 22 2017, 4:35 PM.

Diff Detail

Repository
rDSTO Storage manager
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

olasd requested changes to this revision.Feb 22 2017, 4:45 PM
olasd added a reviewer: olasd.
olasd added a subscriber: olasd.

Hey,

There's a tiny bit of duplication that we should avoid now before we start adding more methods: the tar generation method should be moved to the base class.

That way we can centralize the "varying output format" logic, as well as the actual archive creation logic (we'll soon want to generate the file on-disk rather than in RAM).

This revision now requires changes to proceed.Feb 22 2017, 4:45 PM

So there's another problem with that: can there be multiple "output formats"? like, flattened tar, flattened zip, flattened git-ish tar, flattened git-ish zip? Should we differenciate the archive format from the output format?

Yeah, we should probably distinguish on "output format" rather than "archive format". However I don't think we need the two separate concepts.

(As an aside, I'm still not entirely convinced that providing a choice between zip and tar is worth the effort, as tar is superior in every way, and it's easy to support even on Windows)

In any case, "making a tar from a directory" sounds like something that we'll have to do a lot :)

seirl edited edge metadata.
  • RevisionVaultCooker: factor out tar creation function
olasd edited edge metadata.
This revision is now accepted and ready to land.Feb 23 2017, 5:49 PM
This revision was automatically updated to reflect the committed changes.