Gist · 4 / URL: http://calantas.org/_admin/gists/4
Public Gist
bashalias
Expires: Never
veto - created 6 months and 14 days ago
updated file: gistfile1.txt
gistfile1.txt
alias hgu='hg pull;hg up;'

hgp() {
    hg st | grep '^\!' | awk '{$1="";print substr($0,2)}' | xargs -d '\n' hg add
    hg st | grep '^\!' | awk '{$1="";print substr($0,2)}' | xargs -d '\n' hg remove
    if [ -z ${1} ]; then
      hg commit -m"update";
    else
      hg commit -m"${1}";
    fi
    hg push
}


gitp() {
    git add .

    if [ -z ${1} ]; then
      git commit -m"update";
    else
      git commit -m"${1}";
    fi

    git push
}