INNER CODE UNIT · Python

cmd_repair

kangarooking/cangjie-skill · scripts/cangjie.py:217

def cmd_repair(args) -> int:
    from repair_flow import run_repair  # Phase 3

    return run_repair(Path(args.pack), Path(args.case))


def cmd_rollback(args) -> int:
    sidecar = Path(args.pack) / ".cangjie"
    snaps = sorted((sidecar / "snapshots").glob("*")) if (sidecar / "snapshots").exists() else []
    if args.list or not args.to:
        print("可用快照:" + ("\n  " + "\n  ".join(s.name for s in snaps) if snaps else " (无)"))
        return 0
    snap = sidecar / "snapshots" / args.to
    if not snap.is_dir():
        raise SystemExit(f"快照不存在: {snap}")
    target = Path(args.target)
    with WriterLock(target):
        if target.exists():

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…