Create a Local Repository
|
Create a mercurial repository of current directory with a |
|
Begin tracking |
|
Save files and commit message to repository |
Clone Remote Repository
|
Clone a remote mercurial repository to a local directory |
Update from Remote Repository
|
List changesets available |
|
Pull all new changesets into local |
|
Pull specified changesets into local |
|
Option: also update working directory |
Merge
|
Merge changesets to local repository |
|
Merge from a named branch or revision into the current local branch |
|
Inform mercurial about the resolution of merge conflicts |
|
After successful merge, commit the changes |
Undos and Fixes
|
Undo commit, import, pull, local push or unbundle Only use in private repositories. |
|
Cancel an uncommitted merge and lose changes |
|
Undo all uncommitted changes |
Create an Archive
|
Create an archive Example args: |
Work Files and Tracking
|
Begin tracking changes |
|
Track new, forget missing |
|
Stop tracking file |
|
Stop tracking & delete |
|
Copy file |
|
Move file |
These changes must also be committed to avoid data loss. |
Work Directory Updates
|
Update work to match tip |
|
Update work to specified revision |
Work Status
|
List tracked file changes |
|
List changes to a file |
|
List status of files |
Added, Clean, Deleted, Ignored, Modified or Unknown |
Local Repository History
|
Fire up a builtin local webserver for browsing and sharing repository over HTTP |
|
History of changesets |
|
Who changed what, when |
|
List known remote repositories |
|
List heads |
|
Before merge, you can look up the parents of the branch |
|
Show differences between REVs |
Remote Update and Publish
|
Push changesets to remote |
|
Sync history with parent and siblings |
Terminology
|
Collection of revisions |
|
A file which stores defaults for a repository. Global is ~/.hgrc and local is .hgrc inside the repository |
|
Committed changeset, by REV number |
|
Set of work changes saved as diffs |
|
Changes between files |
|
Name for a specific revision |
|
Immediate ancestor(s) of revision or work |
|
Child of a revision |
|
A head is a changeset with no child changesets |
|
The process of merging two HEADS |
|
Latest revision in any branch |
|
All diffs between two revisions |
|
Patch with permissions and rename support |
Help and Usage
|
Basic command list |
|
Full command list |
|
Detailed help reference |
|
|
Common Options
|
Specify a REV number (default parent) |
|
Do not prompt, pick each first option |
|
Quiet (supress output) |
|
Verbose (additional detail) |
|
Force (override reasonable warnings) |
Notes
- Based on a cheat sheet by Shane Robinson