-
Add files and commit from the source control side-bar (i.e. where git normally appears).
-
All the basics: commit, add, forget, update, push and pull.
-
See changes inline within text editor.
-
Interactive log for basic file history and diff.
-
Branch, merge heads, merge with branch, resolve + unresolve files.
-
Quickly switch branches, push and pull via status bar.
-
Automatic incoming/outgoing counters.
-
Undo/rollback.
- This is a relatively new extension, so there will likely still be a few "rough edges".
- Please report any bugs, suggestions or documentation requests via the Github issues (yes, I see the irony).
- Feel free to submit pull requests.
Note: This extension leverages your machine's Mercurial (hg) installation,
so you need to install Mercurial first.
-
Open the source control side-bar.
-
Click ⋯ > Switch SCM Provider...
-
Choose Hg
- Just click the Mercurial icon from the source control title area:
- The current branch name is shown in the bottom-left corner.
- Click it to see a list of branches and tags that you can update to.
hg.enabled { boolean }
- Enables Hg as a source control manager in VS Code.
hg.path { string | null }
- Specifies an explicit
hg
file path to use. - This should only be used if
hg
cannot be found automatically. - The default behaviour is to search for
hg
in commonly-known install locations and on the PATH.
hg.autoInOut { boolean }
- Enables automatic counting of incoming/outgoing changes.
- When enabled, these show in the status bar.
- Updated every 3 minutes, or whenever a commit/push/pull is done.
hg.autoRefresh { boolean }
- Enables automatic refreshing of Source Control tab and badge counter when files within the project change:
"true"
— enabled
"false"
— disabled, manual refresh still available.
hg.countBadge { tracked | all | off }
- Controls the badge counter for Source Control in the activity bar:
"tracked"
— only count changes to tracked files (default).
"all"
— include untracked files in count.
"off"
— no badge counter.
hg.allowPushNewBranches { boolean }
- Overrides the warning that normally occurs when a new branch is pushed:
"true"
— new branches are pushed without warning (default).
"false"
— shows a prompt when new branches are being pushed (e.ghg push --new-branch
)
hg.commandMode
- Controls the method used to communicate with
hg
. - There is a slight start-up performance cost with repeatedly running
hg
commands. - Running a command server process in the background allows frequently-used commands to run ~10× faster (e.g.
cat
,status
,summary
,branch
etc.) - The server feature is still expiremental, and is therefore not the default.
"cli"
— spawn a newhg
process per command (default)."server"
— run a command server process i.e.hg serve --cmdserve