SVN Subversion
Use this skill to operate safely in SVN working copies and mixed Git/SVN trees.
The high-risk defaults are: use SVN machine output, preserve Windows/Chinese
path and message encodings, and commit only an explicit reviewed path set.
Command notes in the bundled references were validated against SVN 1.14.3 unless
they are explicitly marked as platform-specific or unverified.
Core Rules
- Parse structured output, not human text. Use
svn status --xml,
svn log --xml, and svn info --show-item; parse XML with a real parser.
- Treat console encoding, pipe encoding, path encoding, and file-content
encoding as separate layers. Set Windows UTF-8 handling before SVN commands.
- Use UTF-8-no-BOM files for path lists and commit messages:
--targets targets.txt where supported, plus -F msg.txt --encoding UTF-8.
- Build and review a commit whitelist before every commit. SVN has no Git
staging index;
svn commit <dir> includes all local modifications below it.
- Add
--non-interactive in automation so auth, certificate, and conflict
prompts cannot hang the run.
- After
svn update, query status for conflicts. A conflicting update can
still exit 0.
- After
svn add --force, re-audit with svn status --xml --no-ignore; SVN
can recursively schedule generated files and hidden children.
- In Git+SVN checkouts, inspect both
svn status and git status because the
two tools track different local state.
Safe Automation Shape
For scripts and repeatable agent work:
- Run
svn cleanup --non-interactive if the working copy may be locked.
- Query state with
svn status --xml --no-ignore.
- Classify paths from XML entries.
- Write a reviewed targets file as UTF-8 without BOM.
- Write the commit message file as UTF-8 without BOM.
- Run the SVN command with
--targets only on subcommands that accept it.
- Re-query
svn status --xml --no-ignore and report remaining changes,
conflicts, locks, and ignored/unversioned files that affect scope.
--targets is accepted by common path-based commands such as commit, add,
delete, revert, info, lock, unlock, changelist, propset, and
log. It is not accepted by status or update; pass paths positionally or
loop over a reviewed list for those commands.
Daily Map
| Intent |
SVN command |
Notes |
| Status |
svn status --xml --no-ignore |
Script-safe; includes ignored items |
| Path info |
svn info --show-item <field> <path> |
Useful fields: url, revision, wc-root |
| Diff |
svn diff <path> |
Recursive by default; large diffs should go to a file |
| Add |
svn add <path> |
New files must be scheduled explicitly |
| Delete |
svn delete <path> |
Local paths schedule deletes; URLs commit immediately |
| Revert local edits |
svn revert <path> |
Not equivalent to git revert <commit> |
| Update |
svn update --accept postpone |
Check status after update |
| Commit |
svn commit --targets targets.txt -F msg.txt --encoding UTF-8 --non-interactive |
Prefer explicit scope |
| History |
svn log --xml <path-or-url> |
Use XML for scripts |
Status Semantics
svn status is column-positional and not space-delimited. In scripts, prefer
XML. If text status must be read, the path starts at column 9.
| Status |
Meaning |
Safe response |
? |
Unversioned |
Add only if in scope |
! |
Versioned but missing from disk |
svn delete to remove, or svn revert to restore |
A |
Scheduled for add |
Include added parent directories and children in commit targets |
D |
Scheduled for delete |
Commit deliberately or revert |
column-1 M |
Content change |
Inspect with svn diff |
column-2 M |
Property change |
Inspect with svn diff --properties-only |
C |
Conflict |
Inspect before resolving |
L |
Working-copy lock |
Run svn cleanup --non-interactive |
Unversioned directories appear as one line and SVN does not enumerate their
children in status. Generated directories in engine repos must be filtered
before add/commit.
Model Traps
- SVN has no staging index; changelists are useful but are not Git staging.
- Mixed-revision working copies are normal. Use
svn export URL@REV for
reproducible release inputs.
- Properties are versioned changes:
svn:eol-style, svn:mime-type,
svn:ignore, svn:global-ignores, svn:needs-lock, and svn:mergeinfo.
svn:ignore is not .gitignore and is not recursive.
mine-full and theirs-full discard the other side of a conflict.
- URL copy/move/delete operations commit immediately; working-copy path
operations usually schedule local changes.
- Case-only renames on Windows need a temporary filename flow on
case-insensitive filesystems.
- Garbled
???? output is usually display decoding, not repository damage;
confirm with XML or svn info before destructive actions.
Reference Files
Load only the file needed for the current task:
- references/daily-commands.md: pre-flight,
status/info parsing, where
--targets works, update, add/delete/move,
revert, commit, diff safety, cleanup, changelists, automation flags, and log.
- references/encoding-and-paths.md:
Windows UTF-8 setup, Chinese path/message traps, TortoiseSVN Unicode path
behavior, URL encoding, and file-content encoding cautions.
- references/conflicts-and-merging.md:
branch/tag/switch, merge and reverse-merge, conflict resolution, and tree
conflicts.
- references/properties-and-assets.md:
svn:ignore, svn:global-ignores, EOL/MIME properties, binary asset locks,
and stash workarounds.
- references/automation-and-troubleshooting.md:
machine-readable automation patterns, probing state, PowerShell exit-code
traps, log capture, and Git+SVN update checks.
- references/game-engine-shortcuts.md:
copy-paste snippets for engine repos, shader/C++ filters, changelist commits,
subsystem reverts, and generated-directory ignore baselines.
1---2name: svn-subversion3description: Use when a repository uses SVN/Subversion or a mixed Git+SVN workflow, especially on Windows working copies, Chinese paths, legacy encodings, game assets, release automation, status/diff/add/revert/update/commit/log/conflict tasks, branch/tag/merge/history operations, svn properties, externals, locks, or automation that must avoid mis-parsing paths, corrupting messages, committing the wrong scope, or treating SVN like Git.4---56# SVN Subversion78Use this skill to operate safely in SVN working copies and mixed Git/SVN trees.9The high-risk defaults are: use SVN machine output, preserve Windows/Chinese10path and message encodings, and commit only an explicit reviewed path set.1112Command notes in the bundled references were validated against SVN 1.14.3 unless13they are explicitly marked as platform-specific or unverified.1415## Core Rules16171. Parse structured output, not human text. Use `svn status --xml`,18 `svn log --xml`, and `svn info --show-item`; parse XML with a real parser.192. Treat console encoding, pipe encoding, path encoding, and file-content20 encoding as separate layers. Set Windows UTF-8 handling before SVN commands.213. Use UTF-8-no-BOM files for path lists and commit messages:22 `--targets targets.txt` where supported, plus `-F msg.txt --encoding UTF-8`.234. Build and review a commit whitelist before every commit. SVN has no Git24 staging index; `svn commit <dir>` includes all local modifications below it.255. Add `--non-interactive` in automation so auth, certificate, and conflict26 prompts cannot hang the run.276. After `svn update`, query status for conflicts. A conflicting update can28 still exit 0.297. After `svn add --force`, re-audit with `svn status --xml --no-ignore`; SVN30 can recursively schedule generated files and hidden children.318. In Git+SVN checkouts, inspect both `svn status` and `git status` because the32 two tools track different local state.3334## Safe Automation Shape3536For scripts and repeatable agent work:37381. Run `svn cleanup --non-interactive` if the working copy may be locked.392. Query state with `svn status --xml --no-ignore`.403. Classify paths from XML entries.414. Write a reviewed targets file as UTF-8 without BOM.425. Write the commit message file as UTF-8 without BOM.436. Run the SVN command with `--targets` only on subcommands that accept it.447. Re-query `svn status --xml --no-ignore` and report remaining changes,45 conflicts, locks, and ignored/unversioned files that affect scope.4647`--targets` is accepted by common path-based commands such as `commit`, `add`,48`delete`, `revert`, `info`, `lock`, `unlock`, `changelist`, `propset`, and49`log`. It is not accepted by `status` or `update`; pass paths positionally or50loop over a reviewed list for those commands.5152## Daily Map5354| Intent | SVN command | Notes |55|--------|-------------|-------|56| Status | `svn status --xml --no-ignore` | Script-safe; includes ignored items |57| Path info | `svn info --show-item <field> <path>` | Useful fields: `url`, `revision`, `wc-root` |58| Diff | `svn diff <path>` | Recursive by default; large diffs should go to a file |59| Add | `svn add <path>` | New files must be scheduled explicitly |60| Delete | `svn delete <path>` | Local paths schedule deletes; URLs commit immediately |61| Revert local edits | `svn revert <path>` | Not equivalent to `git revert <commit>` |62| Update | `svn update --accept postpone` | Check status after update |63| Commit | `svn commit --targets targets.txt -F msg.txt --encoding UTF-8 --non-interactive` | Prefer explicit scope |64| History | `svn log --xml <path-or-url>` | Use XML for scripts |6566## Status Semantics6768`svn status` is column-positional and not space-delimited. In scripts, prefer69XML. If text status must be read, the path starts at column 9.7071| Status | Meaning | Safe response |72|--------|---------|---------------|73| `?` | Unversioned | Add only if in scope |74| `!` | Versioned but missing from disk | `svn delete` to remove, or `svn revert` to restore |75| `A` | Scheduled for add | Include added parent directories and children in commit targets |76| `D` | Scheduled for delete | Commit deliberately or revert |77| column-1 `M` | Content change | Inspect with `svn diff` |78| column-2 `M` | Property change | Inspect with `svn diff --properties-only` |79| `C` | Conflict | Inspect before resolving |80| `L` | Working-copy lock | Run `svn cleanup --non-interactive` |8182Unversioned directories appear as one line and SVN does not enumerate their83children in status. Generated directories in engine repos must be filtered84before add/commit.8586## Model Traps8788- SVN has no staging index; changelists are useful but are not Git staging.89- Mixed-revision working copies are normal. Use `svn export URL@REV` for90 reproducible release inputs.91- Properties are versioned changes: `svn:eol-style`, `svn:mime-type`,92 `svn:ignore`, `svn:global-ignores`, `svn:needs-lock`, and `svn:mergeinfo`.93- `svn:ignore` is not `.gitignore` and is not recursive.94- `mine-full` and `theirs-full` discard the other side of a conflict.95- URL copy/move/delete operations commit immediately; working-copy path96 operations usually schedule local changes.97- Case-only renames on Windows need a temporary filename flow on98 case-insensitive filesystems.99- Garbled `????` output is usually display decoding, not repository damage;100 confirm with XML or `svn info` before destructive actions.101102## Reference Files103104Load only the file needed for the current task:105106- [references/daily-commands.md](references/daily-commands.md): pre-flight,107 status/info parsing, where `--targets` works, update, add/delete/move,108 revert, commit, diff safety, cleanup, changelists, automation flags, and log.109- [references/encoding-and-paths.md](references/encoding-and-paths.md):110 Windows UTF-8 setup, Chinese path/message traps, TortoiseSVN Unicode path111 behavior, URL encoding, and file-content encoding cautions.112- [references/conflicts-and-merging.md](references/conflicts-and-merging.md):113 branch/tag/switch, merge and reverse-merge, conflict resolution, and tree114 conflicts.115- [references/properties-and-assets.md](references/properties-and-assets.md):116 `svn:ignore`, `svn:global-ignores`, EOL/MIME properties, binary asset locks,117 and stash workarounds.118- [references/automation-and-troubleshooting.md](references/automation-and-troubleshooting.md):119 machine-readable automation patterns, probing state, PowerShell exit-code120 traps, log capture, and Git+SVN update checks.121- [references/game-engine-shortcuts.md](references/game-engine-shortcuts.md):122 copy-paste snippets for engine repos, shader/C++ filters, changelist commits,123 subsystem reverts, and generated-directory ignore baselines.