Skip to content

Support for Mercurial repositories #375

@jodogne

Description

@jodogne

Dear all,

I have just created a publiccode.yml for the Orthanc project, at the following location.

When I run the validator on this file, I get:

$ docker run -i italia/publiccode-parser-go /dev/stdin < publiccode.yml
publiccode.yml:3:1: error: url: is not a valid code repository

But, the url indeed refers to a valid Mercurial source code repository.

This seems to indicate that publiccode-parser-go does not feature support for Mercurial repositories. To validate whether the url is valid for Mercurial, one could check whether the ?cmd=capabilities query string is accessible under the provided URL, while ?cmd=nope returns a 400 HTTP status code. The ?cmd=capabilities query string indeed serves as a starting point for the Mercurial binary protocol. For instance:

$ curl https://orthanc.uclouvain.be/hg/orthanc/?cmd=capabilities
batch branchmap bundle2=HG20%0Abookmarks%0Achangegroup%3D01%2C02%2C03%0Acheckheads%3Drelated%0Adelta-compression%3Dnone%2Czlib%2Czstd%0Adigests%3Dmd5%2Csha1%2Csha512%0Aerror%3Dabort%2Cunsupportedcontent%2Cpushraced%2Cpushkey%0Ahgtagsfnodes%0Alistkeys%0Aphases%3Dheads%0Apushkey%0Aremote-changegroup%3Dhttp%2Chttps%0Astream%3Dv2 changegroupsubset compression=zstd,zlib getbundle httpheader=1024 httpmediatype=0.1rx,0.1tx,0.2tx known lookup pushkey streamreqs=generaldelta,revlog-compression-zstd,revlogv1 unbundle=HG10GZ,HG10BZ,HG10UN unbundlehash
$ curl -w '%{http_code}' -o /dev/null -s https://orthanc.uclouvain.be/hg/orthanc/?cmd=nope
400

Kind Regards,
Sébastien-

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions