Mercurial
Onofficiรซle Beta-vertaling
Deze pagina is vertaald door PageTurner AI (beta). Niet officieel goedgekeurd door het project. Een fout gevonden? Probleem melden โ
Watโ
Geeft Mercurial-informatie weer wanneer je je in een Mercurial-repository bevindt. Voor maximale compatibiliteit,
zorg ervoor dat je hg-programma up-to-date is (bijvoorbeeld wanneer branch- of statusinformatie onjuist is).
Voorbeeldconfiguratieโ
- json
- yaml
- toml
{
"type": "mercurial",
"style": "powerline",
"powerline_symbol": "๎ฐ",
"foreground": "#193549",
"background": "#ffeb3b",
"options": {
"fetch_status": true,
"native_fallback": false
}
}
type: mercurial
style: powerline
powerline_symbol: ๎ฐ
foreground: "#193549"
background: "#ffeb3b"
options:
fetch_status: true
native_fallback: false
type = "mercurial"
style = "powerline"
powerline_symbol = "๎ฐ"
foreground = "#193549"
background = "#ffeb3b"
[options]
fetch_status = true
native_fallback = false
Optiesโ
Informatie ophalenโ
Omdat Mercurial (hg)-aanroepen de promptervaring kunnen vertragen, wordt informatie standaard niet opgehaald.
Je kunt fetch_status instellen op true om aanvullende informatie op te halen (en de template in te vullen).
| Name | Type | Default | Description |
|---|---|---|---|
fetch_status | boolean | false | fetch the local changes |
native_fallback | boolean | false | when set to true and hg.exe is not available when inside a WSL2 shared Windows drive, we will fallback to the native hg 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 |
Template (informatie)โ
standaard template
hg {{.Branch}} {{if .LocalCommitNumber}}({{.LocalCommitNumber}}:{{.ChangeSetIDShort}}){{end}}{{range .Bookmarks }} \uf02e {{.}}{{end}}{{range .Tags}} \uf02b {{.}}{{end}}{{if .Working.Changed}} \uf044 {{ .Working.String }}{{ end }}
Eigenschappenโ
| Name | Type | Description |
|---|---|---|
.Working | Status | changes in the worktree (see below) |
.IsTip | boolean | Current commit is the tip commit |
.ChangeSetID | string | The current local commit number |
.ChangeSetIDShort | string | The current local commit number |
.Branch | string | current branch |
.Bookmarks | []string | the currently checked out revision number |
.Tags | []string | the currently checked out revision number |
Statusโ
| 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 |
.Changed | boolean | if the status contains changes or not |
.String | string | a string representation of the changes above |
Lokale wijzigingen gebruiken de volgende syntax:
| Icon | Description |
|---|---|
? | Untracked |
~ | Modified |
- | Deleted |
+ | Added |