HomeSoftware Heritage

Add new class QualifiedSWHID to replace SWHID, and deprecate the latter.

This commit no longer exists in the repository. It may have been part of a branch which was deleted.

Description

Add new class QualifiedSWHID to replace SWHID, and deprecate the latter.

Following the discussion on T3034, we decided to replace SWHID with
two or three classes:

  • QualifiedSWHID to replace the existing SWHID (standard types + qualifiers)
  • CoreSWHID, for "core SWHID" only (standard types + no qualifiers)
  • ExtendedSWHID for internal use in Software Heritage (extra types + no qualifiers)

Since migrating from SWHID will break existing code, this commit uses
the opportunity to modernize it a little, ie.:

  • keyword-only constructor, to get rid of the hacky default values for object_type and object_id
  • enum instead of strings for the object type
  • bytes instead of an hex string for the object id
  • rename metadata to qualifiers

Details

Provenance
vlorentzAuthored on Feb 16 2021, 1:33 PM
vlorentzPushed on Feb 25 2021, 3:28 PM
Differential Revision
D5081: Add new class QualifiedSWHID to replace SWHID, and deprecate the latter.
Build Status
Buildable 19471
Build 30210: test-and-buildJenkins console · Jenkins

Commit No Longer Exists

This commit no longer exists in the repository.