lib/update.operations
branchdns-new
changeset 89 51270237a6ff
parent 88 52d058780506
child 90 5b33ccac38ad
--- a/lib/update.operations	Thu Dec 19 02:30:00 2013 +0200
+++ b/lib/update.operations	Thu Dec 19 02:38:03 2013 +0200
@@ -323,11 +323,12 @@
 ### Commit
 ## Perform `hg commit`
 function do_commit {
+    local repo=$1
     local msg=$1
 
-    [ $LOG_DIFF ] && indent "    " hg_diff
+    [ $LOG_DIFF ] && indent "    " hg_diff $repo
 
-    hg_commit "$msg"
+    hg_commit $repo "$msg"
 }
 
 
@@ -336,7 +337,8 @@
 #   commit_data
 #
 # Invokes `hg commit`, first showing the diff.
-function commit_data {
+function commit {
+    local repo=$1
     local commit_msg="$COMMIT_MSG"
 
     local msg="Commit changes"
@@ -347,17 +349,17 @@
 
         do_commit "$commit_msg"
 
-    elif ! hg_modified; then
-        log_skip    "$msg: no changes"
+    elif ! hg_modified $repo; then
+        log_warn    "$msg: no changes"
 
     elif [ $COMMIT_SKIP ]; then
         log_noop    "$msg: skipped"
         
         # still show diff, though
-        [ $LOG_DIFF ] && indent "    " hg_diff
+        [ $LOG_DIFF ] && indent "    " hg_diff $repo
     else
         log_update  "$msg..."
 
-        do_commit "$commit_msg"
+        do_commit $repo "$commit_msg"
     fi
 }