package volgo-hg-backend

  1. Overview
  2. Docs
An IO-free library that parses the output of Mercurial commands

Install

dune-project
 Dependency

Authors

Maintainers

Sources

volgo-0.0.22.tbz
sha256=2714935a34417be2151736a4765431746c9348db5a3b4f0eaacaf74dfaefeabb
sha512=0eba27395125ae928fd53561029d9653094d822b2907cb9afc18f412b46ef47cf880ba80d1bf17212add4e68e6a55e2792176303e2b0bcee08940e25731b4738

doc/volgo-hg-backend/Volgo_hg_backend/index.html

Module Volgo_hg_backendSource

Volgo_hg_backend is a helper library to build Mercurial backends for the Vcs library based on the Mercurial cli hg.

Given the ability to run a hg process, Volgo_hg_backend knows what command to run, how to parse its output and how to interpret its exit code to turn it into a typed result.

Volgo_hg_backend is not meant to be used directly by a user. Rather it is one of the building blocks involved in creating a Mercurial backend for the Vcs library.

Volgo_hg_backend has currently two instantiations as part of its distribution (packaged separately to keep the dependencies isolated).

  • One based on the Eio runtime
  • One based on the Stdlib.Unix runtime, for blocking programs.

We make some efforts to rely on stable and machine friendly output when one is available and documented in the hg cli man pages, but this is not always possible, so the implementation uses some kind of best effort strategy. Also, to avoid running into hg version issues, we're trying to rely on Mercurial commands that have been there for a while.

module Runtime : sig ... end

Defining the interface of a compatible runtime.

Providers of Vcs Traits

Sourcemodule Trait : sig ... end

The list of traits that are implemented in Volgo_hg_backend.

Create a backend based on a runtime.

Sourcemodule type S = sig ... end
Sourcemodule Make (Runtime : Runtime.S) : S with type t = Runtime.t

Individual Trait Implementation

The rest of the modules are functors that are parametrized by your Runtime. Given the ability to run a hg command line, this modules return a backend implementation for each of the traits defined by the Vcs library supported by this library. The individual functors are exposed for convenience.

Sourcemodule Add : sig ... end
Sourcemodule Commit : sig ... end
Sourcemodule Current_revision : sig ... end
Sourcemodule Init : sig ... end
Sourcemodule Ls_files : sig ... end
Sourcemodule Private : sig ... end