Page MenuHomeSoftware Heritage

Write an overview of how to write VCS loaders.
ClosedPublic

Authored by vlorentz on Apr 7 2021, 4:17 PM.

Diff Detail

Repository
rDLDBASE Generic VCS/Package Loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D5443 (id=19460)

Rebasing onto 47b7254f61...

Current branch diff-target is up to date.
Changes applied before test
commit 5922f19eac39f9c041704c2f06e808dc4d99d57b
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Apr 7 16:16:34 2021 +0200

    Write an overview of how to write VCS loaders.

See https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/471/ for more details.

ardumont added inline comments.
docs/vcs-loader-overview.rst
7

packages sounds a bit strange, artifacts is not so good either but nothing comes to mind right now.

75

that's also true for the failures (well most of those failures anyway, putting aside the communication issues...)

125–138

maybe this is better?

131

that should not happen, we write from bottom up, from content up to snapshot (so directories are written prior to revisions here)

138

Yes, and it's already part of the load algorithm so... i do not get the point...

docs/vcs-loader-overview.rst
131

Existing loaders do, yes. But it's a guide to write a new loader...

138

Yes, and it's already part of the load algorithm so... i do not get the point...

It's part of DVCSLoader.load, not BaseLoader.load.

And it also doesn't apply if the loader reimplements load (eg. the Git loader)

fix mistakes noticed by ardumont

And in fact, existing loaders don't always load in topological order. They always load directories before revisions, but directories can point to revisions.

Build is green

Patch application report for D5443 (id=19476)

Rebasing onto 47b7254f61...

Current branch diff-target is up to date.
Changes applied before test
commit 134c828efea40dca5d925729d6670d7e1bdc61e2
Author: Valentin Lorentz <vlorentz@softwareheritage.org>
Date:   Wed Apr 7 16:16:34 2021 +0200

    Write an overview of how to write VCS loaders.

See https://jenkins.softwareheritage.org/job/DLDBASE/job/tests-on-diff/472/ for more details.

docs/vcs-loader-overview.rst
131

right ;)

138

It's part of DVCSLoader.load, not BaseLoader.load.

right.

And it also doesn't apply if the loader reimplements load (eg. the Git loader)

I had forgotten about that

This revision is now accepted and ready to land.Apr 8 2021, 12:22 PM