Reputation: 1407
I am working on projects for different clients using Mercurial as a VCS. I know how to set a default user, but is there a mean to set a different user for each project ?
Upvotes: 11
Views: 1104
Reputation: 42405
Alternatively to setting username for each repository you can use Mercurial Dynamic Username extension and set usernames for specific locations in your global ~/.hgrc
like this:
[extensions]
dynamic_username =
[dynamic_username]
work.location = ~/work
work.username = John Smith <[email protected]>
hobby.location = ~/hobby ~/blogging
hobby.username = Johny <[email protected]>
Upvotes: 6
Reputation: 24491
Just edit the file .hg/hgrc
inside each repository. It's the same syntax as your ~/.hgrc
but will only affect a specific repo.
In repo1/.hg/hgrc
:
[ui]
username = Foo Bar <[email protected]>
And in repo2/.hg/hgrc
:
[ui]
username = Something Else <[email protected]>
Upvotes: 16