package volgo

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Vcs.Mock_revsSource

Maintaining a mapping between mock revs and actual revs.

This is used to build reproducible tests.

Sourcetype t

t is a mutable data structure that holds a bidirectional mapping between actual and mock revisions.

Sourceval create : unit -> t
Sourceval next : t -> Rev.t

Generate a new mock rev, not bound to any particular actual revision.

Sourceval add_exn : t -> rev:Rev.t -> mock_rev:Rev.t -> unit

Add a binding between a revision and a mock revision. This raises if such revisions are already bound in t.

Sourceval to_mock : t -> rev:Rev.t -> Rev.t

Given a revision of an actual repository, resolve it and return the mock revision that is bound to it in t. If this rev isn't bound to any mock rev in t yet, this function will call next to build a new mock revision, bind it in t and return it.

Sourceval of_mock : t -> mock_rev:Rev.t -> Rev.t option

Return the revision bound to the given mock rev, or None if this mock revision is unbound.

OCaml

Innovation. Community. Security.