How to create aliases for Mercurial commands

Just like aliases in bash, you can create aliases for Mercurial commands. This functionality is available through the alias extension. Just create a new section in your Mercurial configuration file and add aliases.

For example, to create an alias to show log in graph format and another to show compact log:

lg = log --graph
lc = log --style=compact

Even Mercurial commands can be replaced with an alias.

Tried with: Mercurial 2.0.2 and Ubuntu 12.04.1 LTS

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.