package opam-repository

  1. Overview
  2. Docs

Create a backend from a VCS implementation.

Parameters

module VCS : VCS

Signature

val name : OpamUrl.backend

pull_url local_dir checksum remote_url pulls the contents of remote_url into local_dir.

Two kinds of results are allowed:

  • a single file was downloaded, in this case it is placed within local_dir and returned as Some filename
  • a directory was retrieved, in this case the contents of local_dir have been synchronised with its own, and None is returned

checksum can be used for retrieval but is NOT checked by this function.

pull_repo_update fetches the remote update from url to the local repository at dirname, but does not apply it, allowing for further verifications. The file or directory returned is always temporary and should be cleaned up by the caller.

val repo_update_complete : OpamTypes.dirname -> OpamTypes.url -> unit OpamProcess.job

repo_update_complete dirname url finalizes the update of the repository after verification of the patch returned from pull_repo_update with Update_patch file is applied. Version control systems, e.g. Mercurial, that track the state of the working directory automatically use this to update internal caches.

Return the (optional) revision of a given repository. Only useful for VCS backends. Is not expected to work with pull_repo_update, which doesn't update the VCS commit information.

Like pull_url, except for locally-bound version control backends, where it should get the latest, uncommitted source.

OCaml

Innovation. Community. Security.