precommit mercurial hook to stop commits to the wrong branch
问题 I have a piece of software in a Mercurial repository. I'm packaging my software project as a Debian package. It seems the standard way to do this is to have a separate branch for the Debian package files, which live in the debian sub-directory. One problem I keep having is that I forget which branch I am on and accidentally commit to the wrong branch. This happens frequently, and is really annoying. When this happens I usually push to remote before realising the problem, and then have to fix