Identities extension

This extension is not distributed with Mercurial.

Author: Rune Halvorsen



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.


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

hgext.identities = <path to>

Then add as many identies as you like:

work = John Doe <>
play = John Doe <>

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


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.


IdentitiesExtension (last edited 2012-02-15 22:14:08 by ks3095497)