Skip to content
Snippets Groups Projects
Commit 131298ca authored by Stefano Zacchiroli's avatar Stefano Zacchiroli
Browse files

swh.model: document how origin PIDs are computed

parent 298c9429
No related branches found
No related tags found
No related merge requests found
...@@ -606,7 +606,11 @@ def snapshot_identifier(snapshot, *, ignore_unresolved=False): ...@@ -606,7 +606,11 @@ def snapshot_identifier(snapshot, *, ignore_unresolved=False):
def origin_identifier(origin): def origin_identifier(origin):
"""Return the intrinsic identifier for an origin.""" """Return the intrinsic identifier for an origin.
An origin's identifier is the sha1 checksum of the entire origin URL
"""
return hashlib.sha1(origin['url'].encode('ascii')).hexdigest() return hashlib.sha1(origin['url'].encode('ascii')).hexdigest()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment