# You always want to do rebase pulls. alias pull='hg pull --rebase' # You always want to pull before pushing, to avoid spurious collisions. alias push='pull && hg push' # Commits, and prepends the current directory name to the commit message. # Just pass it the commit message as an argument. function save { hg commit -m "[${PWD##*/}] ${1}" } # Regens, commits, and pulls/pushes, all in one package. # Pass it the commit message as an argument. function rcommit { regenerate && save "${1}" . && push }