Page MenuHomeSoftware Heritage

Properly handle transplant_source in changeset extra fields

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



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

rDLDHG Mercurial loader
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.