Page MenuHomeSoftware Heritage

Fix release_identifier for snapshot target
ClosedPublic

Authored by anlambert on Nov 28 2019, 4:54 PM.

Details

Summary

While playing with swh-model, I noticed the release_identifier function ends
up with error when a release target type is a snapshot (what does it mean by the way,
I can't picture it).

A mapping between 'snapshot' to its git equivalent was missing. Looking at the git glossary,
refs seems the best choice here but maybe I am wrong.

Diff Detail

Repository
rDMOD Data model
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

anlambert created this revision.Nov 28 2019, 4:54 PM
vlorentz accepted this revision.Nov 29 2019, 1:58 PM
vlorentz added a subscriber: vlorentz.
vlorentz added inline comments.
swh/model/tests/test_identifiers.py
670

you forgot to remove this line

This revision is now accepted and ready to land.Nov 29 2019, 1:58 PM
anlambert updated this revision to Diff 8373.Nov 29 2019, 2:02 PM

Update: Forgot to remove print statement

olasd added a subscriber: olasd.Nov 29 2019, 2:20 PM

Thanks!

I'm just a tiny bit worried that this "swh extension" might clash with something that upstream git implements, if we reuse git terminology.

I'd be more comfortable with using something obviously ours, like "swh-snp". That way the chance of "upstream" clash goes down to zero.