Page MenuHomeSoftware Heritage

Fix person name clashes in revision_add and release_add.
ClosedPublic

Authored by vlorentz on Apr 9 2019, 4:24 PM.

Details

Summary

When two revisions/releases have authors with the same fullname
but different names (which should never happen in practice, but
since name/email parsing is on a best-effort basis, you never
know...).

Bug found by Hypothesis.

Diff Detail

Repository
rDSTO Storage manager
Branch
fullname-clash
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5250
Build 7104: tox-on-jenkinsJenkins
Build 7103: arc lint + arc unit

Event Timeline

olasd added a subscriber: olasd.

Sometimes, I wonder if we wouldn't be better off dropping the name and email parsed fields and only keeping fullname in the database...

In any case, the test would be less surprising if both authors were "sensible" parsings of the same fullname.

For instance, fullname = 'John Doe <john.doe@example.com>' (two spaces) can sensibly parse to name = 'John Doe', email = 'john.doe@example.com', as well as name = 'John Doe ', email = 'john.doe@example.com' (with the trailing space).

This revision is now accepted and ready to land.Apr 9 2019, 4:49 PM
This revision was automatically updated to reflect the committed changes.