Thanks to visit codestin.com
Credit goes to github.com

Skip to content

toddllm/everpatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

everpatch

everpatch is a standalone patch queue engine for carrying durable patch sets across evolving upstream repositories.

It is repo-agnostic:

  • target repository is supplied at runtime
  • patch packs are discovered from any directory
  • each patch is responsible for its own structure-aware detect/apply logic

Quick Start

Run against a repository with a patches/ directory:

everpatch apply --repo-root /path/to/repo --patch-root /path/to/patches

Dry-run:

everpatch apply --repo-root /path/to/repo --patch-root /path/to/patches --dry-run

Detect only:

everpatch detect --repo-root /path/to/repo --patch-root /path/to/patches

JSON output:

everpatch apply --repo-root /path/to/repo --patch-root /path/to/patches --json

Patch Pack Contract

Each patch directory contains:

  • patch.py (required)
  • patch.json (optional metadata)
  • verify.sh (optional, if patch.py does not define verify)

Patch API in patch.py:

  • detect(ctx) or legacy detect(repo_root) -> dict with applied: bool
  • apply(ctx, dry_run=False) or legacy apply(repo_root, dry_run=False)
  • optional verify(ctx) or legacy verify(repo_root) -> (ok, message) or bool

ctx exposes:

  • ctx.repo_root: target repo path
  • ctx.patch_root: root directory used for discovery
  • ctx.patch_dir: current patch directory
  • ctx.metadata: parsed patch.json content

Verification

Verification runs for each patch unless --skip-verify or --dry-run is set.

Order:

  1. patch verify(...) function (if present)
  2. verify.sh script (if present)
  3. no-op success

For verify.sh, these environment variables are provided:

  • EVERPATCH_REPO_ROOT
  • EVERPATCH_PATCH_ROOT
  • EVERPATCH_PATCH_DIR
  • EVERPATCH_PATCH_ID

Included Example

examples/torch_spyre_dma_patch contains the original DMA helper/pybind patch as a portable example patch pack for torch-spyre.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages