From 1a5d70108cc5a6cd7bbc3b780f5e645fd088154b Mon Sep 17 00:00:00 2001 From: "Fred T. Hamster" Date: Fri, 13 Feb 2026 08:51:48 -0500 Subject: [PATCH] adopting two repository lists needed to separate the checkouts from the checkins, since many times i am working with other people's code and cannot check anything in, but i can check things out just fine. and similarly, i have accounts that can get my code but not check it in, and they should not have to see errors all the time from trying an operation they cannot complete. --- .../feisty_meow_command_reference.txt | 12 ++++++----- scripts/core/variables.sh | 18 +++++++++------- scripts/customize/fred/fred_variables.sh | 15 ++++++++----- scripts/rev_control/checkin.sh | 21 ++++++++++++------- scripts/rev_control/getem.sh | 11 +++++----- scripts/rev_control/puffer.sh | 13 ++++++------ scripts/rev_control/version_control.sh | 9 ++++---- 7 files changed, 59 insertions(+), 40 deletions(-) diff --git a/documentation/feisty_meow_command_reference.txt b/documentation/feisty_meow_command_reference.txt index e67a6998..690d1b56 100644 --- a/documentation/feisty_meow_command_reference.txt +++ b/documentation/feisty_meow_command_reference.txt @@ -99,7 +99,7 @@ then operates on those names. changes that could cause problems later. ======== -the next suite of commands uses the REPOSITORY_LIST* environment variables +the next suite of commands uses the REPOSITORY_LIST_* environment variables as the set of revision-controlled folders to operate on: REPOSITORY_LIST_TO_PULL => the set of version-controlled folders that the user @@ -115,14 +115,16 @@ apex) to the pull list to ensure that updates are received when available. ======== getem: - update all repositories in the REPOSITORY_LIST from their upstream remote - counterparts. fast. + update all repositories in the REPOSITORY_LIST_TO_PULL variable from their + upstream remote counterparts. fast. puffer: - puffs out the REPOSITORY_LIST items to merge upstream changes. + puffs out the REPOSITORY_LIST_TO_PULL items to merge upstream changes. checkin: - checks in all changes in the REPOSITORY_LIST to their remote repositories. + first updates all of the items in the REPOSITORY_LIST_TO_PULL list (similar + to puffer), but then checks in all changes in the REPOSITORY_LIST_TO_COMMIT + to their remote repositories. ======== some assorted other revision control commands: diff --git a/scripts/core/variables.sh b/scripts/core/variables.sh index a3ee1045..3f8b72e2 100644 --- a/scripts/core/variables.sh +++ b/scripts/core/variables.sh @@ -260,14 +260,18 @@ define_yeti_variable DEFAULT_FEISTYMEOW_ORG_DIR=/opt/feistymeow.org # the base checkout list is just to update feisty_meow. additional folder # names can be added in your customized scripts. the space at the end of # this variable is important and allows users to extend the list like: - # define_yeti_variable REPOSITORY_DIR+="muppets configs" + # REPOSITORY_DIR+="muppets configs " # see the customize/fred folder for a live example. - define_yeti_variable REPOSITORY_LIST="$FEISTY_MEOW_APEX " + define_yeti_variable REPOSITORY_LIST_TO_PULL="$FEISTY_MEOW_APEX " + define_yeti_variable REPOSITORY_LIST_TO_COMMIT="" # add in any active projects to the repository list. -#hmmm: resolve if still using this folder. +#hmmm: resolve if still using this 'active' folder. if [ -d "$FEISTY_MEOW_PERSONAL_HOME/active" ]; then - REPOSITORY_LIST+="$(find "$FEISTY_MEOW_PERSONAL_HOME/active" -maxdepth 1 -mindepth 1 -type d) " + active_addin+="$(find "$FEISTY_MEOW_PERSONAL_HOME/active" -maxdepth 1 -mindepth 1 -type d) " + REPOSITORY_LIST_TO_PULL+="$active_addin " + REPOSITORY_LIST_TO_COMMIT+="$active_addin " + unset active_addin fi # add in any folders that are under the feisty meow applications folder. @@ -283,11 +287,11 @@ define_yeti_variable DEFAULT_FEISTYMEOW_ORG_DIR=/opt/feistymeow.org if [ -d "$FEISTY_MEOW_REPOS_SCAN" ]; then #hmmm: handle the repos as if they are multi value!!! # general search for normal project folders in source. - REPOSITORY_LIST+="$(find "$FEISTY_MEOW_REPOS_SCAN" -maxdepth 2 -mindepth 2 -iname ".git" -type d -exec dirname {} ';') " - REPOSITORY_LIST+="$(find "$FEISTY_MEOW_REPOS_SCAN" -maxdepth 2 -mindepth 2 -iname ".svn" -type d -exec dirname {} ';') " + REPOSITORY_LIST_TO_PULL+="$(find "$FEISTY_MEOW_REPOS_SCAN" -maxdepth 2 -mindepth 2 -iname ".git" -type d -exec dirname {} ';') " + REPOSITORY_LIST_TO_PULL+="$(find "$FEISTY_MEOW_REPOS_SCAN" -maxdepth 2 -mindepth 2 -iname ".svn" -type d -exec dirname {} ';') " # special search for site avenger directories; they have avenger5 as second level. - REPOSITORY_LIST+="$(find "$FEISTY_MEOW_REPOS_SCAN" -maxdepth 2 -mindepth 2 -iname "avenger5" -type d) " + REPOSITORY_LIST_TO_PULL+="$(find "$FEISTY_MEOW_REPOS_SCAN" -maxdepth 2 -mindepth 2 -iname "avenger5" -type d) " fi # the archive list is a set of directories that are major repositories of diff --git a/scripts/customize/fred/fred_variables.sh b/scripts/customize/fred/fred_variables.sh index b6848be9..1ba00a19 100644 --- a/scripts/customize/fred/fred_variables.sh +++ b/scripts/customize/fred/fred_variables.sh @@ -19,12 +19,17 @@ if [ -z "$USER_CUSTOMIZATIONS_LOADED" ]; then export WEBBED_SITES=/var/www fi -#hmmm: ebooks is not useful any more... # add a bunch of personal folders to the list for checkin & checkout. - REPOSITORY_LIST=" $CLOUD_BASE \ - $FEISTY_MEOW_PERSONAL_HOME/ebooks \ - $FEISTY_MEOW_PERSONAL_HOME/web \ - ${REPOSITORY_LIST} " + fred_addins=" $CLOUD_BASE \ + $FEISTY_MEOW_PERSONAL_HOME/web" + REPOSITORY_LIST_TO_PULL=" $fred_addins \ + ${REPOSITORY_LIST_TO_PULL} " + # for fred, we add in a commit of feisty_meow code. this is not something + # everyone can do, thus not everyone should use fred's config. + REPOSITORY_LIST_TO_COMMIT=" $fred_addins \ + ${FEISTY_MEOW_APEX} \ + ${REPOSITORY_LIST_TO_COMMIT} " + unset fred_addins # adds our locally relevant archive folders into the list to be synched. MAJOR_ARCHIVE_SOURCES+="/z/archons /z/basement /z/imaginations /z/musix /z/toaster /z/walrus $HOME/brobdingnag" diff --git a/scripts/rev_control/checkin.sh b/scripts/rev_control/checkin.sh index 9d71f0cf..70996de9 100644 --- a/scripts/rev_control/checkin.sh +++ b/scripts/rev_control/checkin.sh @@ -1,6 +1,7 @@ #!/usr/bin/env bash -# checkin: checks in all the folders present in the REPOSITORY_LIST variable. +# checkin: checks in all the folders present in the REPOSITORY_LIST_TO_COMMIT variable, +# after updating everyone in REPOSITORY_LIST_TO_PULL. source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh" @@ -11,13 +12,17 @@ save_terminal_title echo "committing repositories at: $(date)" -FULL_LIST=" $(dirname $FEISTY_MEOW_APEX) $HOME " -if [ "$OS" == "Windows_NT" ]; then - FULL_LIST+=" c:/ d:/ e:/ " -fi - -checkin_list $FULL_LIST -exit_on_error "revision control check-in of list: $FULL_LIST" +FULL_LIST_OUT="${REPOSITORY_LIST_TO_PULL}" +#still wrong: FULL_LIST_OUT=" $(dirname $FEISTY_MEOW_APEX) $HOME " +#ack: if [ "$OS" == "Windows_NT" ]; then +# FULL_LIST+=" c:/ d:/ e:/ " +#fi +puff_out_list $FULL_LIST_OUT +exit_on_error "revision control puffing-out of list: $FULL_LIST_OUT" + +FULL_LIST_IN="${REPOSITORY_LIST_TO_COMMIT}" +checkin_list $FULL_LIST_IN +exit_on_error "revision control check-in of list: $FULL_LIST_IN" echo diff --git a/scripts/rev_control/getem.sh b/scripts/rev_control/getem.sh index 72b333cf..3249cfc2 100644 --- a/scripts/rev_control/getem.sh +++ b/scripts/rev_control/getem.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# gets any updates for the repository folders present in the REPOSITORY_LIST variable. +# gets any updates for the repository folders present in the REPOSITORY_LIST_TO_PULL variable. source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh" source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh" @@ -42,10 +42,11 @@ exit_on_error "removing file: $TMPO_CHK" echo "getting repositories at: $(date)" # perform the checkouts as appropriate per OS. -FULL_LIST="$(dirname $FEISTY_MEOW_APEX) $HOME" -if [ "$OS" == "Windows_NT" ]; then - FULL_LIST+="c:/ d:/ e:/" -fi +#wrong: FULL_LIST="$(dirname $FEISTY_MEOW_APEX) $HOME" +FULL_LIST="${REPOSITORY_LIST_TO_PULL}" +#argh: if [ "$OS" == "Windows_NT" ]; then +# FULL_LIST+="c:/ d:/ e:/" +#fi checkout_list $FULL_LIST 2>&1 | tee -a "$TMPO_CHK" exit_on_error "checking out list: $FULL_LIST" diff --git a/scripts/rev_control/puffer.sh b/scripts/rev_control/puffer.sh index eaea0405..83fcf4c2 100644 --- a/scripts/rev_control/puffer.sh +++ b/scripts/rev_control/puffer.sh @@ -1,8 +1,8 @@ #!/usr/bin/env bash -# puffer: "puffs out" all of the folders present in the REPOSITORY_LIST +# puffer: "puffs out" all of the folders listed in the REPOSITORY_LIST_TO_PULL # variable, which causes the repo to be merged with its remote versions. -# this enables a clean check-in; after puffer runs, there will be no secret +# this enables a clean check-in; after puffer runs; there will be no secret # upstream changes that could mess up the git push (svn and cvs are not # supported in this script, since they branch differently than git). @@ -18,10 +18,11 @@ save_terminal_title echo "puffing out repositories at: $(date)" -FULL_LIST=" $(dirname $FEISTY_MEOW_APEX) $HOME " -if [ "$OS" == "Windows_NT" ]; then - FULL_LIST+=" c:/ d:/ e:/ " -fi +#wrong: FULL_LIST=" $(dirname $FEISTY_MEOW_APEX) $HOME " +FULL_LIST="${REPOSITORY_LIST_TO_PULL}" +#no, and yuck: if [ "$OS" == "Windows_NT" ]; then +# FULL_LIST+=" c:/ d:/ e:/ " +#fi puff_out_list $FULL_LIST exit_on_error "puffing out list: $FULL_LIST" diff --git a/scripts/rev_control/version_control.sh b/scripts/rev_control/version_control.sh index 2396dc3f..c8748589 100644 --- a/scripts/rev_control/version_control.sh +++ b/scripts/rev_control/version_control.sh @@ -234,7 +234,8 @@ function checkin_list() local list="$(uniquify $*)" # turn repo list back into an array. - eval "repository_list=( ${REPOSITORY_LIST[*]} )" + repolist_combined="$(uniquify ${REPOSITORY_LIST_TO_COMMIT[*]} ${REPOSITORY_LIST_TO_PULL[*]})" + eval "repository_list=( $repolist_combined )" local outer inner @@ -490,7 +491,7 @@ function checkout_list() local list="$(uniquify $*)" # turn repo list back into an array. - eval "repository_list=( ${REPOSITORY_LIST[*]} )" + eval "repository_list=( ${REPOSITORY_LIST_TO_PULL[*]} )" local outer inner @@ -514,7 +515,7 @@ function checkout_list() } # does a careful update on all the folders in the specified list; -# it looks in the REPOSITORY_LIST for those names and updates them. +# it looks in the REPOSITORY_LIST_TO_PULL for those names and updates them. # this is just like checkout_list, but it's for the puffing up action # we need to do on git. function puff_out_list() @@ -523,7 +524,7 @@ function puff_out_list() local list="$(uniquify $*)" # turn repo list back into an array. - eval "repository_list=( ${REPOSITORY_LIST[*]} )" + eval "repository_list=( ${REPOSITORY_LIST_TO_PULL[*]} )" local outer inner -- 2.43.0