Index
core
Core module for axm-edit.
Contains the batch editing engine and git checkpoint logic.
batch_apply(root, operations)
Validate and apply a batch of file operations atomically.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Path
|
Project root directory (all paths are relative to this). |
required |
operations
|
Sequence[Operation]
|
List of replace, create, and delete operations. |
required |
Returns:
| Type | Description |
|---|---|
BatchResult
|
BatchResult with success status, checkpoint SHA, and summary. |
Source code in packages/axm-edit/src/axm_edit/core/engine.py
create_checkpoint(root)
Create a git stash checkpoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Path
|
Project root directory. |
required |
Returns:
| Type | Description |
|---|---|
str | None
|
The stash commit SHA, or |
str | None
|
to stash. |
Source code in packages/axm-edit/src/axm_edit/core/checkpoint.py
rollback(root, checkpoint)
Rollback to a previous checkpoint.
Restores the working tree to the state captured by
:func:create_checkpoint.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
root
|
Path
|
Project root directory. |
required |
checkpoint
|
str
|
The stash SHA returned by |
required |
Returns:
| Type | Description |
|---|---|
bool
|
|