Page MenuHomeSoftware Heritage

Properly handle transplant_source in changeset extra fields
ClosedPublic

Authored by anlambert on Thu, May 23, 2:11 PM.

Details

Summary

Mercurial changeset can contain extra data in it, notably a transplant_source field
referencing another changeset id. In contrary to other extra fields, this one stores
the changeset reference in binary instead of using the hexadecimal representation.

So to ease original changeset extra data exploitation and avoid decoding errors,
prefer to store the hexadecimal representation of the changeset id in the
swh revision metadata.

Related T1729

Test Plan

A new test case has been added.

Diff Detail

Repository
rDLDHG Mercurial loader
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.Thu, May 23, 2:11 PM
ardumont accepted this revision.Thu, May 23, 2:24 PM
This revision is now accepted and ready to land.Thu, May 23, 2:24 PM
This revision was automatically updated to reflect the committed changes.