Differences between revisions 13 and 16 (spanning 3 versions)
Revision 13 as of 2009-08-10 08:00:18
Size: 925
Editor: TillPlewe
Comment:
Revision 16 as of 2010-08-28 15:02:48
Size: 956
Editor: abuehl
Comment:
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
'''This extension is currently being distributed along with Mercurial.'''

''Author: Brendan Cully''
'''This extension has been moved into core Mercurial as of 1.3.'''
''Original author: Brendan Cully''
Line 10: Line 8:
Just enable the extension, then define your own command aliases in your hgrc.
For example, the configuration below gives you a new {{{llog}}} command.
/!\ In Mercurial 1.3 and newer, this is no longer an extension; the functionality (same as before) is now available from core Mercurial.

Define your own shortcuts for Mercurial's command-line user interface.
Line 14: Line 13:
Configure your .hgrc to enable the extension by adding the following lines:
Line 16: Line 14:
{{{
[extensions]
alias =

[alias]
# short log
llog = log --limit 10
}}}

Starting with version 1.3 it suffices to add:
Add the following lines to a hgrc to add a llog command:
Line 33: Line 22:
=== Future Work === (In 1.2.1 and earlier, you also need to activate the extension from the {{{[extensions]}}} section.)

=== Ideas for improvements ===
Line 50: Line 41:
CategoryExtension CategoryBundledExtension

Alias Extension

This extension has been moved into core Mercurial as of 1.3. Original author: Brendan Cully

1. Overview

/!\ In Mercurial 1.3 and newer, this is no longer an extension; the functionality (same as before) is now available from core Mercurial.

Define your own shortcuts for Mercurial's command-line user interface.

2. Configuration

Add the following lines to a hgrc to add a llog command:

[alias]
# short log
llog = log --limit 10

(In 1.2.1 and earlier, you also need to activate the extension from the [extensions] section.)

3. Ideas for improvements

  • Support for global options like --config in extension definitions
  • Shell aliases
  • Argument substitution
    mq = hg -R $(hg root)/.hg/patches $*
  • Pipes
    hgrep = hg manifest | grep $*
  • Recursive alias definitions:
    foo = bar
    bar = log


CategoryBundledExtension

AliasExtension (last edited 2013-08-08 00:05:19 by rcl)