Prevent commit to wrong named branch

jf jfmeteo at gmail.com
Mon May 9 09:00:40 UTC 2011


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.



More information about the Mercurial mailing list