Multiple personalities
Angel Ezquerra
angel.ezquerra at gmail.com
Wed Apr 4 11:24:02 UTC 2012
On Wed, Apr 4, 2012 at 12:50 PM, Alan Mackenzie <acm at muc.de> wrote:
> Hi, Mercurial!
>
> My first post here.
>
> What is the best way of managing several identities? When I commit to
> one repository I am (i) acm at muc.de. When I commit to another, I am
> (ii) bug-cc-mode at gnu.org.
>
> At the moment, I cope with this by having two username settings: in
> ~/.hgrc I have (i) and in <repository>/.hg/hgrc I have (ii). Trouble
> is, this username isn't propagated when I clone the repo. So I've got a
> rather clumsy bash script called cc-clone, which copies the username
> from the original repo to the new one.
>
> This doesn't feel optimal. Is there a better solution to this dual
> identity problem?
>
> --
> Alan Mackenzie (Nuremberg, Germany).
I think you could use the Projrc extension for that
(http://mercurial.selenic.com/wiki/ProjrcExtension).
Basically, you create an "hgrc-like" projrc file on your .hg folder,
and it will be copied/updated whenever you clone or pull from that
repo. Place your username setting on that projrc file and you are good
to go.
Cheers,
Angel
More information about the Mercurial
mailing list