zshrc.d/30-functions-hg.zrc
author Mikael Berthe <mikael@lilotux.net>
Sat, 14 Jul 2012 22:50:44 +0200
changeset 4 ca432c482cc9
child 9 d7843f267d79
permissions -rw-r--r--
Add hg_pull_and_see


function hg_pull_and_see() {
    if ! $HG_ROOT_CMD > /dev/null; then
        print "Not a Mercurial repository!"
        return -1
    fi

    local i=$(hg id -i)
    hg pull -u
    local j=$(hg id -i)

    if [[ $i != $j ]];then
        hg log --quiet -r${i}:tip --style=changelog
    fi
}