Force user to be System user?
Brendan Cully
brendan at kublai.com
Thu Aug 6 17:51:43 CDT 2009
On Thursday, 06 August 2009 at 17:40, Michael Thomas wrote:
> Douglas Philips wrote:
> > On or about 2009 Aug 6, at 3:42 PM, Michael Thomas inquired:
> >> Noob question but googling provided no answers.
> >>
> >> Is there a way to force the user name of the commiter to be that of the
> >> user account being used? My naive understanding is that using -u one
> >> can make the user be anything one wants? In that scenario how do people
> >> audit who has commited what?
> >
> > No, there isn't. In a distributed system you're just getting bits over
> > the wire.
> > How do you know you can trust the remote system's notion of a user
> > anyways?
> > (This is a big problem, much much bigger than Mercurial)
>
> I should have been more clear. I was thinking of a situation where there
> is a central repository that the user is pushing to. So, if for example
> I was pushing to ssh://fred@foo.com/repo hg would use fred as the user
> making the change rather than a random user I might specify using -u. In
> that case you at least see where a "real" user made the integration into
> the central repository.
>
> Note that this isn't about trust, its about being able to easily
> identify who did what and when. The ability to record the ssh user as
> the comitter actually allows me to leave the repository open to all
> users. Without it I need to go to a staging strategy or some other
> intermediary step I would rather not have to go to.
You might be interested in something like the sonichg extension then:
http://mercurial.selenic.com/wiki/SonicHgExtension
I haven't used it, but one of its features is that it maintains a push
log on the server side.
More information about the Mercurial
mailing list