This opens the --swhid to the swh upload cli.
If the update is ok, this returns the unchanged status summary of the deposit.
Otherwise, for example, update a non-complete deposit (status not "done"), this returns an explicit error.
Scenario around those cases are explicited in the diff.
Sample cli:
swh deposit upload \ --url https://deposit.internal.staging.swh.network/ \ --username swh \ --password $(swhpass ls operations/deposit.softwareheritage.org/http-auth/swh | head -1) \ --metadata "./deposit-update.xml" \ # [1] --deposit-id 605 \ --swhid swh:1:dir:ef04a768181417fbc5eef4243e2507915f24deea
[1] deposit-update.xml
<?xml version="1.0" encoding="utf-8"?> <entry xmlns="http://www.w3.org/2005/Atom" xmlns:codemeta="https://doi.org/10.5063/SCHEMA/CODEMETA-2.0"> <name>test-project</name> <author>ardumont</author> <codemeta:identifier>38857a56-bab9-46f6-9087-6f91f3e1be89</codemeta:identifier> </entry>
This cli sample is the equivalent of P815 (which uses curl).
Related to T2538