Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Presently we are serving Mercurial Repository (hgweb) behind the Apache server, when user pushes changes to Apache it is authenticated by userid/password (pwauth). How to restrict the push to user commits by user@myorg.com and must be authenticate as user (pwauth) instead of otheruser2?

share|improve this question

1 Answer 1

The best way to do such a thing would be with a pretxnchangegroup hook in Mercurial itself. You'd have to inspect each commit in the set to ensure that the username matches. The reason for this being that just because someone is pushing some changesets to a server, it doesn't mean they've created all those changesets themselves.

For example, someone could have pulled changes from someone else, merged them in to their own branch, and then be pushing the result up to the server.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.