website/docs/segments/scm/svn.mdx
Display Subversion information when in a subversion repository. Also works for subfolders. For maximum compatibility,
make sure your svn executable is up-to-date (when branch or status information is incorrect for example).
import Config from "@site/src/components/Config.js";
<Config data={{ type: "svn", style: "powerline", powerline_symbol: "\uE0B0", foreground: "#193549", background: "#ffeb3b", }} />
As doing multiple subversion calls can slow down the prompt experience, we only fetch what your config displays. Oh My Posh inspects every template in your config - segment, color and style templates, cross-segment references, extra prompts, tooltips, fillers, palette values and the console title - and runs the status fetch only when one of them references a field it populates.
| Name | Type | Default | Description |
|---|---|---|---|
native_fallback | boolean | false | when set to true and svn.exe is not available when inside a WSL2 shared Windows drive, we will fallback to the native svn executable to fetch data. Not all information can be displayed in this case |
status_formats | map[string]string | a key, value map allowing to override how individual status items are displayed. For example, "status_formats": { "Added": "Added: %d" } will display the added count as Added: 1 instead of +1. See the Status section for available overrides |
:::info
The fields Repo, Branch and BaseRev are always fetched, independent of the working-copy status scan.
:::
:::note default template
\ue0a0{{.Branch}} r{{.BaseRev}} {{.Working.String}}
:::
| Name | Type | Description |
|---|---|---|
.Working | Status | changes in the worktree (see below) |
.Branch | string | current branch (relative URL reported by svn info) |
.BaseRev | int | the currently checked out revision number |
.Repo | string | current repository (repos root URL reported by svn info) |
| Name | Type | Description |
|---|---|---|
.Untracked | int | number of files not under version control |
.Modified | int | number of modified files |
.Deleted | int | number of deleted files |
.Added | int | number of added files |
.Moved | int | number of changed moved files |
.Conflicted | int | number of changed tracked files with conflicts |
.Changed | boolean | if the status contains changes or not |
.HasConflicts | boolean | if the status contains conflicts or not |
.String | string | a string representation of the changes above |
Local changes use the following syntax:
| Icon | Description |
|---|---|
? | Untracked |
~ | Modified |
- | Deleted |
+ | Added |
> | Moved |
! | Conflicted |