Identities extension

This extension is not distributed with Mercurial.

Author: Rune Halvorsen

Repository: http://bitbucket.org/runeh/identities/

Overview

identities is an extension for Mercurial that makes it easy to switch between user names. This can be useful if you commit to both private and work related projects from the same machine for instance.

Configuration

Enable the extension by adding the following to your .hgrc:

[extensions]
hgext.identities = <path to identities.py>

Then add as many identies as you like:

[identities]
work = John Doe <busybee@example.com>
play = John Doe <happyfuntime@example.com>

If there is a default username set in the [ui] section of your global settings, that will also be picked up by the extension.

Use

The extension hooks in to the Mercurial commit command, so that if there is nt user set in the settings for the repository, the extension will prompt the user to select which identitiy to commit as.

It can become annoying having to select the identity for each commit, so if you like you can configure permamently for a repo. To do this, call hg identity. You will be prompted for an identity, and the choice will be saved in the repository settings.


CategoryExtensionsByOthers