--- a/lib/update.args Tue Mar 20 14:15:22 2012 +0200
+++ b/lib/update.args Tue Mar 20 14:24:58 2012 +0200
@@ -16,6 +16,7 @@
LOG_SKIP=
LOG_DEBUG=
LOG_CMD=
+LOG_DIFF=y
UPDATE_FORCE=
UPDATE_NOOP=
@@ -80,6 +81,7 @@
LOG_UPDATE=
LOG_FORCE=
LOG_NOOP=
+ LOG_DIFF=
;;
v) LOG_SKIP=y ;;
--- a/lib/update.updates Tue Mar 20 14:15:22 2012 +0200
+++ b/lib/update.updates Tue Mar 20 14:24:58 2012 +0200
@@ -155,7 +155,7 @@
function do_commit {
local msg=$1
- indent " " hg_diff
+ [ $LOG_DIFF ] && indent " " hg_diff
hg_commit "$msg"
}
--- a/lib/update.utils Tue Mar 20 14:15:22 2012 +0200
+++ b/lib/update.utils Tue Mar 20 14:24:58 2012 +0200
@@ -15,6 +15,12 @@
"$@" || die "Failed"
}
+## Execute command, prefixing its output on stdout with given indent prefix.
+#
+# indent " " $cmd...
+#
+# Output is kept on stdout, exit status is that of the given command.
+# Also logs the executed command at log_cmd level..
function indent () {
local indent=$1; shift