2009-09-19 60 views

回答

14

只需在每个存储库中编辑文件.hg/hgrc即可。它与~/.hgrc的语法相同,但只会影响特定的回购。

repo1/.hg/hgrc

[ui] 
username = Foo Bar <[email protected]> 

而且在repo2/.hg/hgrc

[ui] 
username = Something Else <[email protected]> 
+0

nift你好!非常感谢你 ! – edomaur 2009-09-19 12:02:34

4

或者为每个存储库设置的用户名可以使用Mercurial Dynamic Username扩展,在全局~/.hgrc这样设置特定地点的用户名:

[extensions] 
dynamic_username = 

[dynamic_username] 
work.location = ~/work 
work.username = John Smith <[email protected]> 
hobby.location = ~/hobby ~/blogging 
hobby.username = Johny <[email protected]> 
相关问题