Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Is it possible to write some manner of hook in mercurial that will reject changesets that effect a specific named branch in a repository?

We have a managed project and would like to allow any developers to push their changes to our repository so long as they are in their own named branch. We'd like to block any attempts to write to the default branch from outsiders (we would, internally, merge their branches over).

share|improve this question
1  
I think this question might be better suited for stackoverflow. –  alex Sep 28 '09 at 18:05
    
Looks like goathens did ask and get an answer over at stackoverflow: stackoverflow.com/questions/1488604/… Maybe someone should delete this one? –  Ry4an Nov 8 '09 at 18:43

2 Answers 2

up vote 1 down vote accepted

It looks like you could do this with pretxnchangegroup or pretxncommit, but you'd have to do the legwork (poking into the changesets and finding out which branch they affect) yourself.

See the Mercurial book section on hooks

share|improve this answer

With a small registration process, you could give each of them a complete repository, which admittadly isn't quite as convient as branches. A variation is to us a service like BitBucket to handle some of the fork tracking for you.

share|improve this answer

Your Answer

 
discard

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.