Reputation: 394
I am migrating our company SCM from SVN to mercurial.
The current scenario is like this. SVN is running on a separate Ubuntu server dedicated to it. So all the developers were checking the code in and out using "svn+ssh" protocol from their individual machines using Users created on the Ubuntu server. As a result whichever user they use on SSH, its recorded on the repo as the author of the changeset.
So, In Mercurial, Is it possible to use the same set of users created on Ubuntu to be used and be recorded as authors whenever the developers check-in via SSH (instead of the local usernames set in hgrc)??
hg clone ssh://[email protected]//hg/support
is what i am trying to use. It works but for the author issue.
Upvotes: 3
Views: 113
Reputation: 21056
No, this is not possible. You are running into a fundamental difference between central and decentralized version control.
In a DVCS, the author is configured in every developer’s local configuration, and is set as soon as the change is committed. After this, the commit is immutable, its hash is fixed, and thus when you push it the server does not have the ability to alter the author.
This is not perceived as a problem, the mantra is: if you don’t trust your developers to set the correct name, probably you should not give them access to push code in the first place. The author is merely useful meta-data, not authoritative.
If you still need to log this somehow, what you can do is to create a pushlog, using a hook which records which users pushed what changesets. Examples are out there, e.g. Mozilla has one, google for “mercurial pushlog”.
Upvotes: 6