dagger/dsl/changeset

Types

pub type Opts {
  Opts(on_conflict: option.Option(types.ChangesetMergeConflict))
}

Constructors

Values

pub fn added_paths(
  parent: types.Changeset,
  client client: types.Client,
  then handler: fn(Result(List(String), types.QueryError)) -> a,
) -> a

Files and directories that were added in the newer directory.

pub fn after(parent: types.Changeset) -> types.Directory

The newer/upper snapshot.

pub fn as_patch(parent: types.Changeset) -> types.File

Return a Git-compatible patch of the changes

pub fn before(parent: types.Changeset) -> types.Directory

The older/lower snapshot to compare against.

pub fn export(
  parent: types.Changeset,
  path path: String,
  client client: types.Client,
  then handler: fn(Result(String, types.QueryError)) -> a,
) -> a

Applies the diff represented by this changeset to a path on the host.

pub fn id(parent: types.Changeset) -> types.Changeset

A unique identifier for this Changeset.

pub fn is_empty(
  parent: types.Changeset,
  client client: types.Client,
  then handler: fn(Result(Bool, types.QueryError)) -> a,
) -> a

Returns true if the changeset is empty (i.e. there are no changes).

pub fn layer(parent: types.Changeset) -> types.Directory

Return a snapshot containing only the created and modified files

pub fn modified_paths(
  parent: types.Changeset,
  client client: types.Client,
  then handler: fn(Result(List(String), types.QueryError)) -> a,
) -> a

Files and directories that existed before and were updated in the newer directory.

pub fn none(opts: Opts) -> Opts
pub fn on_conflict(
  opts: Opts,
  val: types.ChangesetMergeConflict,
) -> Opts
pub fn removed_paths(
  parent: types.Changeset,
  client client: types.Client,
  then handler: fn(Result(List(String), types.QueryError)) -> a,
) -> a

Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.

pub fn sync(parent: types.Changeset) -> types.Changeset

Force evaluation in the engine.

pub fn with_changeset(
  parent: types.Changeset,
  changes changes: types.Changeset,
  with with_fn: fn(Opts) -> Opts,
) -> types.Changeset

Add changes to an existing changeset By default the operation will fail in case of conflicts, for instance a file modified in both changesets. The behavior can be adjusted using onConflict argument

pub fn with_changesets(
  parent: types.Changeset,
  changes changes: List(types.Changeset),
  with with_fn: fn(Opts) -> Opts,
) -> types.Changeset

Add changes from multiple changesets using git octopus merge strategy This is more efficient than chaining multiple withChangeset calls when merging many changesets. Only FAIL and FAIL_EARLY conflict strategies are supported (octopus merge cannot use -X ours/theirs).

Search Document