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
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

vlorentz created this revision.Apr 9 2019, 4:24 PM
olasd accepted this revision.Apr 9 2019, 4:49 PM
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
vlorentz updated this revision to Diff 4442.Apr 9 2019, 5:01 PM

less surprising test

vlorentz updated this revision to Diff 4465.Apr 9 2019, 5:49 PM
  • rebase
This revision was automatically updated to reflect the committed changes.