From f0c01dc48273899710b1b724f32354e7dae72f11 Mon Sep 17 00:00:00 2001 From: thierry Date: Mon, 30 Jul 2007 11:23:54 +0000 Subject: [PATCH] support for diff --- scripts/import-module.sh | 43 ++++++++++++++++++++++++++++++---------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/scripts/import-module.sh b/scripts/import-module.sh index 6fd099b..32e4c36 100755 --- a/scripts/import-module.sh +++ b/scripts/import-module.sh @@ -302,7 +302,6 @@ function import_module () { } ############################## - function tag_usage () { echo "Usage: $0 module" exit 1 @@ -403,13 +402,37 @@ function tag_module () { done } +#################### +function diff_modules () { + for module in "$@" ; do + tagtrunk=$HOME/tags/$module/trunk + echo "--------------------Checking $module" + run_prompt y "Updating $tagwork" svn update $tagtrunk + ### extracting current version info + spec=$(figure_module_spec $tagtrunk $module) + version=$(extract_from_spec $spec version) + subversion=$(extract_from_spec $spec subversion) + + echo "FOUND spec=$spec version=$version subversion=$subversion" + + lasttag=$svn/$module/tags/$module-${version}.${subversion} + trunk=$svn/$module/trunk + + run_prompt y "Diffing : < last tag -- trunk >" svn diff $lasttag $trunk + + done +} + +#################### case $0 in - *import-module*) - import_module $@;; - *tag-module*) - tag_module $@;; - *test*) - x=$(figure_module_spec $@) ; echo $x;; - *) - echo "Unsupported command $0" ; exit 0 - esac + *import-module*) + import_module $@;; + *tag-module*) + tag_module $@;; + *diff-module*) + diff_modules $@ ;; + *test*) + x=$(figure_module_spec $@) ; echo $x;; + *) + echo "Unsupported command $0" ; exit 0 +esac -- 2.43.0