X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=scripts%2Frev_control%2Fversion_control.sh;h=be77a2f6449ff5cfbc9b35bef2da0bc6cc4f071c;hb=b9709dc381635b605588629c3c8a4584263278d0;hp=119f0dcf45b2a74b39d420806db51ced356153b6;hpb=b6af556282b79c026f5b038fccbbf9cabc692890;p=feisty_meow.git diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 119f0dcf..be77a2f6 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -244,7 +244,7 @@ function all_branch_names() # git repository. function my_branch_name() { - echo "$(git branch -vv | grep '\*' | cut -d ' ' -f2)" + echo "$(git branch -vv | grep '^\*' | cut -d ' ' -f2)" } # reports the status of the branch by echoing one of these values: @@ -284,7 +284,7 @@ function check_branch_state() return $to_return } -# showes the branch currently active in the repository. +# shows the branch currently active in the repository. function show_active_branch() { #hmmm: if no args, assume current dir!? @@ -295,13 +295,15 @@ function show_active_branch() #echo "calculated directory as '$directory'" fi - echo -n -e "$(basename $directory)\t=> branch " + echo -n -e "$(basename $directory) => branch " pushd "$directory" &>/dev/null #hmmm: if git... git rev-parse --abbrev-ref HEAD #hmmm: else OTHERS!!! + echo + popd &>/dev/null done } @@ -507,7 +509,7 @@ function generate_rev_ctrl_filelist() pushd "$dir" &>/dev/null local dirhere="$( \cd "$(\dirname "$dir")" && /bin/pwd )" local tempfile=$(mktemp /tmp/zz_checkins.XXXXXX) - echo >$tempfile + echo -n >$tempfile local additional_filter find $dirhere -follow -maxdepth $MAX_DEPTH -type d -iname ".svn" -exec echo {}/.. ';' >>$tempfile 2>/dev/null find $dirhere -follow -maxdepth $MAX_DEPTH -type d -iname ".git" -exec echo {}/.. ';' >>$tempfile 2>/dev/null @@ -541,7 +543,7 @@ function perform_revctrl_action_on_file() fi did_anything=yes pushd "$dirname" &>/dev/null - echo "[$(pwd)]" + echo -n "[$(pwd)] " # pass the current directory plus the remaining parameters from function invocation. $action . exit_on_error "performing action $action on: $(pwd)"