I like creating named branches in Mercurial to deal with features that might take a while to code, so when I push I do a hg push -r default
to ensure I\'m only
Since normally you should push changesets in the current branch you are working, I modified the above answer made by ry4an-brase, to push current branch with a notice.
#!/bin/sh
HG=/usr/bin/hg # executable
if echo $* | grep -P -q -- 'push\s*$' ; then
printf "\033[1;31mChanged to: hg push -r .\033[0m\n"
$HG $* -r .
else
$HG $*
fi