# HG changeset patch # User Tero Marttila # Date 1332237991 -7200 # Node ID 57551a87a93ea0d12d90e636a0119cdb3170f074 # Parent 39799fc994e99df8b6bacbb4f851c05d45e0d5a2 update: hardcode $REPO in hg diff -r 39799fc994e9 -r 57551a87a93e bin/update --- a/bin/update Tue Mar 20 11:49:16 2012 +0200 +++ b/bin/update Tue Mar 20 12:06:31 2012 +0200 @@ -233,15 +233,13 @@ ## hg function hg { - local repo=$1; shift + local repo=$REPO; shift cmd $HG -R $ROOT/$repo "$@" } function hg_modified { - local repo=$1 - - hg $repo id | grep -q '+' + hg id | grep -q '+' } function hg_user { @@ -258,18 +256,15 @@ } function hg_diff { - local repo=$1 - - hg $repo diff + hg diff } function hg_commit { - local repo=$1 local msg=$2 local user_opt=$(hg_user) log_debug "commit: $user_opt: $msg" - hg $repo commit $user_opt -m "$msg" + hg commit $user_opt -m "$msg" } @@ -556,14 +551,14 @@ # commit data changes function commit_data { - local repo=$1 + local repo=$REPO - if hg_modified $repo; then + if hg_modified; then log_info "Commit changes in $repo:" - indent " " hg_diff $repo + indent " " hg_diff - hg_commit $repo "$COMMIT_MSG" + hg_commit "$COMMIT_MSG" else log_info "Commit changes in $repo: no changes" fi @@ -692,7 +687,7 @@ else log "Commit data..." - commit_data $REPO + commit_data fi }