Skip to main content

Changeset

API reference

A comparison between two directories representing changes that can be applied.

Implements Exportable, Node, Syncer

addedPaths
Files and directories that were added in the newer directory.
export
Applies the diff represented by this changeset to a path on the host.
id
A unique identifier for this Changeset.
isEmpty
Returns true if the changeset is empty (i.e. there are no changes).
modifiedPaths
Files and directories that existed before and were updated in the newer directory.
removedPaths
Files and directories that were removed. Directories are indicated by a trailing slash, and their child paths are not included.
after
The newer/upper snapshot.
asPatch
Return a Git-compatible patch of the changes
before
The older/lower snapshot to compare against.
diffStats
Structured per-path diff statistics (kind and line counts) for this changeset.
layer
Return a snapshot containing only the created and modified files
sync
Force evaluation in the engine.
withChangeset
Add changes to an existing changeset
withChangesets
Add changes from multiple changesets using git octopus merge strategy

addedPaths: [String!]!

Files and directories that were added in the newer directory.

export(path: String!): String!

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

path: String!

Location of the copied directory (e.g., "logs/").

id: ID!

A unique identifier for this Changeset.

isEmpty: Boolean!

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

modifiedPaths: [String!]!

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

removedPaths: [String!]!

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

after: Directory!

The newer/upper snapshot.

asPatch: File!

Return a Git-compatible patch of the changes

before: Directory!

The older/lower snapshot to compare against.

diffStats: [DiffStat!]!

Structured per-path diff statistics (kind and line counts) for this changeset.

layer: Directory!

Return a snapshot containing only the created and modified files

sync: Changeset!

Force evaluation in the engine.

withChangeset(changes: Changeset!, onConflict: ChangesetMergeConflict = FAIL): 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

changes: Changeset!

Changes to merge into the actual changeset

onConflict: ChangesetMergeConflict = FAIL

What to do on a merge conflict

withChangesets(changes: [Changeset!]!, onConflict: ChangesetsMergeConflict = FAIL): 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).

changes: [Changeset!]!

List of changesets to merge into the actual changeset

onConflict: ChangesetsMergeConflict = FAIL

What to do on a merge conflict

References

Returned by

Accepted as an argument by