Changeset View
Changeset View
Standalone View
Standalone View
docs/persistent-identifiers.rst
.. _persistent-identifiers: | .. _persistent-identifiers: | ||||
================================================= | ================================================= | ||||
SoftWare Heritage persistent IDentifiers (SWHIDs) | SoftWare Heritage persistent IDentifiers (SWHIDs) | ||||
================================================= | ================================================= | ||||
**version 1.5, last modified 2020-05-14** | **version 1.6, last modified 2021-04-30** | ||||
.. contents:: | .. contents:: | ||||
:local: | :local: | ||||
:depth: 2 | :depth: 2 | ||||
Overview | Overview | ||||
======== | ======== | ||||
▲ Show 20 Lines • Show All 207 Lines • ▼ Show 20 Lines | |||||
identifier of any file with the same content; for a revision it is the Git | identifier of any file with the same content; for a revision it is the Git | ||||
commit identifier for the same revision, etc. This is not the case for | commit identifier for the same revision, etc. This is not the case for | ||||
snapshot identifiers, as Git does not have a corresponding object type. | snapshot identifiers, as Git does not have a corresponding object type. | ||||
Note that Git compatibility is incidental and is not guaranteed to be | Note that Git compatibility is incidental and is not guaranteed to be | ||||
maintained in future versions of this scheme (or Git). | maintained in future versions of this scheme (or Git). | ||||
Automatically fixing invalid SWHIDs | |||||
----------------------------------- | |||||
User interfaces may fix invalid SWHIDs, by lower-casing the | |||||
``<identifier_core>`` part of a SWHID, if it contains upper-case letters | |||||
because of user errors or limitations in software displaying SWHIDs. | |||||
However, implementations displaying or generating SWHIDs should not rely | |||||
on this behavior, and must display or generate only valid SWHIDs when | |||||
technically possible. | |||||
User interfaces should show an error when such an automatic fix occurs, | |||||
so users have a chance to fix their SWHID before pasting it to an other interface | |||||
that does not perform the same corrections. | |||||
This also makes it easier to understand issues when a case-sensitive | |||||
qualifier has its casing altered. | |||||
Examples | Examples | ||||
======== | ======== | ||||
Core identifiers | Core identifiers | ||||
---------------- | ---------------- | ||||
* ``swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2`` points to the content | * ``swh:1:cnt:94a9ed024d3859793618152ea559a168bbcbb5e2`` points to the content | ||||
▲ Show 20 Lines • Show All 147 Lines • Show Last 20 Lines |