User

Igor Lautar igor.lautar at gmail.com
Thu Jan 28 07:17:48 CST 2010


Hi,

2010/1/28 Mracskó Balázs Sándor <mracsko at gmail.com>:
> When somebody commits, his username comes from the Mercurial.ini. The
> problem, that anybody can set this name and can commit in the name of
> somebody else. Is there any solution? Maybe when he/she push changes
> to the main repository, somehow add his ssh username to the end of his
> username (in every revision, so if he/she used a fake username (or
> pushed someone else's modifications), the ssh user name will identify
> the user who really pushed the changes). Is that possible? It's
> important to know who pushed something to the repository (i hope
> nobody want to cheat, but the devil never sleeps). Or there are same
> tool or extension to avoid that problem?

We use a hook that checks 'author' in each changeset on push. If this
does not match predefined set of authors, push is rejected.
User can still fake this field if they want to though, this only
ensures proper names are used (if somebody forgets to configure HG
properly for example).

You could prevent name abusing by checking if all names in changesets
being pushed match name of user doing the push. But this also brings
other issues that somehow limits distribuited nature (like pulling
form dev who did not push yet, then pushing yours & his changes).

Regards,


More information about the Mercurial mailing list