QualifiedSWHID: Fix (de)serialization of 'origin' qualifier
Having the escaped URL in swhid.origin
is inconsistent with self.path
(which is always escaped) and never what we want, because it is only
useful while serializing, which is already handled by __str__
.
This led to swh-indexer#4738 (closed)
where swh-deposit parsed a qualified SWHID, then used .origin
to get
an origin URL.
Additionally, as serialization always escapes the origin
qualifier,
this means that deserializing then re-serializing a qualified SWHID
would double-escape it.
Finally, fixing this made the test uncover that %
was not escaped
while serializing, while ;
was, leading to incorrect (and ambiguous)
escaped URLs.
Merge request reports
Activity
Jenkins job DMOD/gitlab-builds #114 succeeded .
See Console Output and Coverage Report for more details.mentioned in issue swh-web#4801 (closed)
Possibly related bug: swh-web#4801 (closed)
mentioned in merge request swh-web!1283 (merged)
Looks good to me !
This change breaks a
swh-web
test that I fixed and improved in swh-web!1283 (merged).added 7 commits
-
951154a7...f1f62388 - 6 commits from branch
master
- 9cf7ad9d - QualifiedSWHID: Fix (de)serialization of 'origin' qualifier
-
951154a7...f1f62388 - 6 commits from branch
Jenkins job DMOD/gitlab-builds #122 succeeded .
See Console Output and Coverage Report for more details.