zshrc.d/30-functions-hg.zrc
changeset 4 ca432c482cc9
child 9 d7843f267d79
equal deleted inserted replaced
3:f2f4db4d9c34 4:ca432c482cc9
       
     1 
       
     2 function hg_pull_and_see() {
       
     3     if ! $HG_ROOT_CMD > /dev/null; then
       
     4         print "Not a Mercurial repository!"
       
     5         return -1
       
     6     fi
       
     7 
       
     8     local i=$(hg id -i)
       
     9     hg pull -u
       
    10     local j=$(hg id -i)
       
    11 
       
    12     if [[ $i != $j ]];then
       
    13         hg log --quiet -r${i}:tip --style=changelog
       
    14     fi
       
    15 }