darcs-2.11.0: a distributed, interactive, smart revision control system

Safe HaskellNone

Darcs.Repository.Job

Synopsis

Documentation

data RepoJob a

A RepoJob wraps up an action to be performed with a repository. Because repositories can contain different types of patches, such actions typically need to be polymorphic in the kind of patch they work on. RepoJob is used to wrap up the polymorphism, and the various functions that act on a RepoJob are responsible for instantiating the underlying action with the appropriate patch type.

Constructors

RepoJob (forall rt p wR wU. (IsRepoType rt, RepoPatch p, ApplyState p ~ Tree, ApplyState (PrimOf p) ~ Tree) => Repository rt p wR wU wR -> IO a)

The most common RepoJob; the underlying action can accept any patch type that a darcs repository may use.

V1Job (forall wR wU. Repository (RepoType NoRebase) (RepoPatchV1 Prim) wR wU wR -> IO a)

A job that only works on darcs 1 patches

V2Job (forall rt wR wU. Repository rt (RepoPatchV2 Prim) wR wU wR -> IO a)

A job that only works on darcs 2 patches

PrimV1Job (forall rt p wR wU. (RepoPatch p, ApplyState p ~ Tree, PrimOf p ~ Prim) => Repository rt p wR wU wR -> IO a)

A job that works on any repository where the patch type p has PrimOf p = Prim.

This was added to support darcsden, which inspects the internals of V1 prim patches.

In future this should be replaced with a more abstract inspection API as part of PrimPatch.

RebaseAwareJob RebaseJobFlags (forall rt p wR wU. (IsRepoType rt, RepoPatch p, ApplyState p ~ Tree, ApplyState (PrimOf p) ~ Tree) => Repository rt p wR wU wR -> IO a) 
RebaseJob RebaseJobFlags (forall p wR wU. (RepoPatch p, ApplyState p ~ Tree, ApplyState (PrimOf p) ~ Tree) => Repository (RepoType IsRebase) p wR wU wR -> IO a) 
StartRebaseJob RebaseJobFlags (forall p wR wU. (RepoPatch p, ApplyState p ~ Tree, ApplyState (PrimOf p) ~ Tree) => Repository (RepoType IsRebase) p wR wU wR -> IO a) 

withRepoLock :: DryRun -> UseCache -> UpdateWorking -> UMask -> RepoJob a -> IO a

apply a given RepoJob to a repository in the current working directory, taking a lock

withRepoLockCanFail :: UseCache -> UpdateWorking -> UMask -> RepoJob () -> IO ()

apply a given RepoJob to a repository in the current working directory, taking a lock. If lock not takeable, do nothing.

withRepository :: UseCache -> RepoJob a -> IO a

apply a given RepoJob to a repository in the current working directory

withRepositoryDirectory :: UseCache -> String -> RepoJob a -> IO a

apply a given RepoJob to a repository in a given url