name: sase_hg_commit description: | Commit changes using sase commit for Google's fig VCS. This skill is the ONLY way that you should EVER commit to fig repos. NEVER invoke this skill unless the user explicitly asks you to commit or a post-completion finalizer triggers it.
Commit changes via the sase commit command.
Instructions
Examine uncommitted changes — Run
hg statusorhg diffto understand what files have changed and why.Write a commit message file — Create a file (e.g.,
commit_message.md) containing a good commit message.Run the commit — Execute:
sase commit -M commit_message.md -f file1.py -f file2.pyFlags:
-M: Path to file containing the commit message. The file is deleted after reading.-m: Inline commit message string (alternative to-M).-mand-Mare mutually exclusive.-f: File to include (repeat for multiple files). Omit to include all changes.--name: CL name (only needed forcreate_pull_requestmethod).
The
$SASE_COMMIT_METHODenvironment variable is read automatically to determine the dispatch method (create_commit,create_proposal, orcreate_pull_request). Do NOT pass--typeunless you need to override.
Example
sase commit -M commit_message.md -f auth.py -f login.py
On Merge Conflict
If sase commit exits with code 2 and prints a "merge conflict" message, the local repository is in a paused
evolve/rebase state and the post-commit bookkeeping has been deferred. Do NOT re-run the original sase commit command.
Instead, resolve the conflict and finalize:
- Find conflicted files: Run
hg resolve --list(lines starting withUare unresolved). - Read each file and resolve conflict markers. Prefer the INCOMING version when uncertain.
- Mark resolved: Run
hg resolve --mark <file>for each. - Continue the rebase/evolve: Run
hg rebase --continue(orhg evolve --continue). Repeat steps 1–4 until clean. - Verify the working tree is clean:
hg statusshould be empty. - Finalize the sase commit: Run
sase commit --resume.