From 95dcbead5c1752493e7298bd235a5d051fac9896 Mon Sep 17 00:00:00 2001 From: sigoure Date: Sat, 21 Oct 2006 08:56:27 +0000 Subject: [PATCH] Hook svn update and add some fancy colors in there. --- svn-wrapper.sh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/svn-wrapper.sh b/svn-wrapper.sh index 90d1dbf..2921f75 100755 --- a/svn-wrapper.sh +++ b/svn-wrapper.sh @@ -819,6 +819,13 @@ svn_status() return $? } +# svn_update [args...] +svn_update() +{ + $SVN update "$@" | sed "$sed_svn_up_colors" + return $? +} + # ------------------- # # `main' starts here. # # ------------------- # @@ -868,6 +875,24 @@ sed_svn_st_color=" s/^!/${lred}!${std}/; t s/^~/${lwhite}~${std}/; t" +sed_svn_up_colors=" + t dummy_sed_1 + : dummy_sed_1 + $ q + /^Updated/ t + /^Fetching/ t + /^External/ t + s/^\\(.\\)C/\\1${lred}C${std}/ + s/^\\(.\\)U/\\1${lgreen}U${std}/ + s/^\\(.\\)D/\\1${lred}D${std}/ + t dummy_sed_2 + : dummy_sed_2 + s/^A/${lgreen}A${std}/; t + s/^U/${lgreen}U${std}/; t + s/^D/${lyellow}D${std}/; t + s/^G/${purple}G${std}/; t + s/^C/${lred}C${std}/; t" + # For dev's: test "x$1" = x--debug && shift && set -x @@ -887,6 +912,10 @@ case "$1" in shift svn_status "$@" ;; + update | up) + shift + svn_update "$@" + ;; # -------------------- # # Custom SVN commands # # -------------------- # -- 2.11.4.GIT