Prevent commit to wrong named branch

Gaunet Sylvain (ASTEK) Sylvain.Gaunet at cnes.fr
Mon May 9 09:06:55 UTC 2011


Yes, you could use the precommit hook.

Best regards.



-----Message d'origine-----
De : mercurial-bounces at selenic.com [mailto:mercurial-bounces at selenic.com] De la part de jf
Envoyé : lundi 9 mai 2011 11:01
À : mercurial at selenic.com
Objet : Prevent commit to wrong named branch


Hello,

I'm planning to use mercurial with named banches, but I think it's too easy to commit something in the wrong branch.

It would be great if I could add an option to "hg commit" which will blame me if I'm not where I think I am, for example: hg commit -b branch_1_0 -m "msg"
> commit aborted: silly dev: you're in default branch not in branch_1_0 
> !

Is there a hook or an extension for doing this ?

Thanks.
_______________________________________________
Mercurial mailing list
Mercurial at selenic.com http://selenic.com/mailman/listinfo/mercurial



More information about the Mercurial mailing list