Mercurial Distributed SCM


Repository creation

clone:make a copy of an existing repository
init:create a new repository in the given directory

Remote repository management

incoming:show new changesets found in source (aliases: in)
outgoing:show changesets not found in the destination (aliases: out)
paths:show aliases for remote repositories
pull:pull changes from the specified source
push:push changes to the specified destination
serve:start stand-alone webserver

Change creation

commit:commit the specified files or all outstanding changes (aliases: ci)

Change manipulation

backout:reverse effect of earlier changeset
graft:copy changes from other branches onto the current branch
merge:merge another revision into working directory

Change organization

bookmarks:create a new bookmark or list existing bookmarks (aliases: bookmark)
branch:set or show the current branch name
branches:list repository named branches
phase:set or show the current phase name
tag:add one or more tags for the current or given revision
tags:list repository tags

File content management

annotate:show changeset information by line for each file (aliases: blame)
cat:output the current or given revision of files
copy:mark files as copied for the next commit (aliases: cp)
diff:diff repository (or selected files)
grep:search revision history for a pattern in specified files

Change navigation

bisect:subdivision search of changesets
heads:show branch heads
identify:identify the working directory or specified revision (aliases: id)
log:show revision history of entire repository or files (aliases: history)

Working directory management

add:add the specified files on the next commit
addremove:add all new files, delete all missing files
files:list tracked files
forget:forget the specified files on the next commit
remove:remove the specified files on the next commit (aliases: rm)
rename:rename files; equivalent of copy + remove (aliases: move, mv)
resolve:redo merges or set/view the merge status of files
revert:restore files to their checkout state
root:print the root (top) of the current working directory
status:show changed files in the working directory (aliases: st)
summary:summarize working directory state (aliases: sum)
update:update working directory (or switch revisions) (aliases: up, checkout, co)

Change import/export

archive:create an unversioned archive of a repository revision
bundle:create a bundle file
export:dump the header and diffs for one or more changesets
import:import an ordered set of patches (aliases: patch)
unbundle:apply one or more bundle files

Repository maintenance

manifest:output the current or given revision of the project manifest
recover:roll back an interrupted transaction
verify:verify the integrity of the repository


config:show combined config settings from all hgrc files (aliases: showconfig, debugconfig)
help:show help for a given topic or a help overview
version:output version and copyright information

Additional Help Topics

Mercurial identifiers

filesets:Specifying File Sets (aliases: fileset)
hgignore:Syntax for Mercurial Ignore Files (aliases: ignore)
patterns:File Name Patterns
revisions:Specifying Revisions (aliases: revs, revsets, revset, multirevs, mrevs)
urls:URL Paths

Mercurial output

color:Colorizing Outputs
dates:Date Formats
diffs:Diff Formats
templating:Template Usage (aliases: templates, template, style)

Mercurial configuration

config:Configuration Files (aliases: hgrc)
environment:Environment Variables (aliases: env)
extensions:Using Additional Features
flags:Command-line flags
hgweb:Configuring hgweb
merge-tools:Merge Tools (aliases: mergetools, mergetool)
pager:Pager Support


bundlespec:Bundle File Formats
phases:Working with Phases
subrepos:Subrepositories (aliases: subrepo)


deprecated:Deprecated Features
internals:Technical implementation topics
scripting:Using Mercurial from scripts and automation



hooks for controlling repository access


log repository events to a blackbox for debugging

blackbox:view the recent repository events


hooks for integrating with the Bugzilla bug tracker


erase file content at a given revision

censor:(no help text available)


command to display statistics about repository history

churn:histogram of changes to the repository


advertise pre-generated bundles to seed clones


close arbitrary heads without checking them out first

close-head:close the given head revisions


import revisions from foreign VCS repositories into Mercurial

convert:convert a foreign SCM repository to a Mercurial one.


automatically manage newlines in repository files


command to allow external programs to compare revisions

extdiff:use external program to diff repository (or selected files)


http authentication with factotum


try mapping git commands to Mercurial commands

githelp:suggests the Mercurial equivalent of the given git command


commands to sign and verify changesets

sigcheck:verify all the signatures there may be for a particular revision
sign:add a signature for the current or given revision
sigs:list signed changesets


browse the repository in a graphical way

view:start interactive history viewer


syntax highlighting for hgweb (requires Pygments)


interactive history editing

histedit:interactively edit changeset history


expand keywords in tracked files

kwdemo:print [keywordmaps] configuration and an expansion example
kwexpand:expand keywords in the working directory
kwfiles:show files configured for keyword expansion
kwshrink:revert expanded keywords in the working directory


track large binary files

lfconvert:convert a normal repository to a largefiles repository
lfpull:pull largefiles for the specified revisions from the specified source


manage a stack of patches

qapplied:print the patches already applied
qclone:clone main and patch repository at same time
qcommit:commit changes in the queue repository (DEPRECATED)
qdelete:remove patches from queue
qdiff:diff of the current patch and subsequent modifications
qfinish:move applied patches into repository history
qfold:fold the named patches into the current patch
qgoto:push or pop patches until named patch is at top of stack
qguard:set or print guards for a patch
qheader:print the header of the topmost or specified patch
qimport:import a patch or existing changeset
qinit:init a new queue repository (DEPRECATED)
qnew:create a new patch
qnext:print the name of the next pushable patch
qpop:pop the current patch off the stack
qprev:print the name of the preceding applied patch
qpush:push the next patch onto the stack
qqueue:manage multiple patch queues
qrefresh:update the current patch
qrename:rename a patch
qrestore:restore the queue state saved by a revision (DEPRECATED)
qsave:save current queue state (DEPRECATED)
qselect:set or print guarded patches to push
qseries:print the entire series file
qtop:print the name of the current patch
qunapplied:print the patches not yet applied


hooks for sending email push notifications


command to send changesets as (a series of) patch emails

email:send changesets by email


command to delete untracked files from the working directory

purge:removes files not tracked by Mercurial


command to move sets of revisions to a different ancestor

rebase:move changeset (and descendants) to a different branch


extend schemes with shortcuts to repository swarms


share a common history between several working directories

share:create a new shared repository
unshare:convert a shared repository to a normal one


save and restore changes to the working directory

shelve:save and set aside changes from the working directory
unshelve:restore a shelved change to the working directory


strip changesets and their descendants from history

strip:strip changesets and all their descendants from the repository


command to transplant changesets from another branch

transplant:transplant changesets from another branch


allow the use of MBCS paths with problematic encodings


discover and advertise repositories on the local network

Advanced Extensions


adds a new flag extras to commit (ADVANCED)

Experimental Extensions


apply working directory changes to changesets (EXPERIMENTAL)

absorb:incorporate corrections into the stack of draft changesets


provide the amend command (EXPERIMENTAL)

amend:amend the working copy parent with all or specified outstanding changes


check for unrecorded moves at commit time (EXPERIMENTAL)


beautify log -G output by using Unicode characters (EXPERIMENTAL)


implements bookmark-based branching (EXPERIMENTAL)


yet another annotate implementation that might be faster (EXPERIMENTAL)


rewrite file content in changesets or working copy (EXPERIMENTAL)

fix:rewrite file content in changesets or working directory


Faster status operations with the Watchman file monitor (EXPERIMENTAL)


store some pushes in a remote blob store on the server (EXPERIMENTAL)


track previous positions of bookmarks (EXPERIMENTAL)

journal:show the previous position of bookmarks and the working copy


lfs - large file support (EXPERIMENTAL)


send ui.log() data to a subprocess (EXPERIMENTAL)


create clones which fetch history data for subset of files (EXPERIMENTAL)

tracked:show or change the current narrowspec


simple Phabricator integration (EXPERIMENTAL)

phabread:print patches from Phabricator suitable for importing
phabsend:upload changesets to Phabricator
phabupdate:update Differential Revision in batch


generate release notes from commit messages (EXPERIMENTAL)

releasenotes:parse release notes from commit messages into an output file


remotefilelog causes Mercurial to lazilly fetch file contents (EXPERIMENTAL)

gc:garbage collect the client and server filelog caches
prefetch:prefetch file revisions from the server
repack:(no help text available)
 (no help text available)


showing remotebookmarks and remotebranches in UI (EXPERIMENTAL)


unified command to show various repository information (EXPERIMENTAL)

show:show various repository information


allow sparse checkouts of the working directory (EXPERIMENTAL)


command to split a changeset into smaller ones (EXPERIMENTAL)

split:split a changeset into smaller ones


store repository data in SQLite (EXPERIMENTAL)


uncommit part or all of a local changeset (EXPERIMENTAL)

unamend:undo the most recent amend operation on a current changeset
uncommit:uncommit part or all of a local changeset

Deprecated Extensions


command to display child changesets (DEPRECATED)

children:show the children of the given or working directory revision


pull, update and merge in one command (DEPRECATED)

fetch:pull changes from a remote repository, merge new changes if needed.


command to view revision graphs from a shell (DEPRECATED)

glog:show revision history alongside an ASCII revision graph


browse command output with an external pager (DEPRECATED)


commands to interactively select changes for commit/qrefresh (DEPRECATED)

qrecord:interactively record a new patch
record:interactively select changes to commit


perform automatic newline conversion (DEPRECATED)