Tell them that they should not do this, and apply the workflow using sniffers in a managed repository.
At work, we limit it to one head / branch. Essentially replace forbid_2head.sh as follows:
#!/bin/bash # Ensure only one head per branch in hg repository for BRANCH in `hg branches -qa` do COUNT=`hg heads -q $BRANCH | wc -l` if [ "$COUNT" -ne "1" ] ; then echo "Error: Trying to push more than one head to branch $BRANCH." exit 1 fi done exit 0
source share