# compresses the git archive in the folder specified.
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh"
+
+##############
+
prune_dir="$1"
if [ -z "$prune_dir" ]; then
prune_dir="$(pwd)"
fi
-pushd "$prune_dir"
+pushd "$prune_dir" &>/dev/null
+test_or_die "changing to directory: $prune_dir"
+
echo "cleaning git repo in directory $(pwd)"
+
git fsck --full
test_or_die "git fsck"
+
git gc --prune=today --aggressive
test_or_die "git gc"
+
git repack
test_or_die "git repack"
-popd
+
+popd &>/dev/null
+
##############
-# trickery to ensure we can always update this file, even when the operating system has some
-# rude behavior with regard to file locking (ahem, windows...).
-# and even more rudeness is that the pwd and $TMP may not always be in the same form,
-# which causes endless confusion and badness. that's why we get the pwd reading for TMP
-# first so we can do an orange-to-orange compare.
+# trickery to ensure we can always update feisty meow, including this specific
+# file, even when the operating system has some rude behavior with regard to
+# file locking (ahem, windoze). and even more rudeness is that the pwd and
+# $TMP may not always be in the same form, which causes endless confusion and
+# badness. that's why we get the pwd reading for TMP first so we can do an
+# oranges-to-oranges compare.
tmpdir="$(cd $TMP; \pwd)"
if [ "$(\pwd)" != "$tmpdir" ]; then
if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then
new_name="$TMP/zz_$(basename $0)"
\cp -f "$0" "$new_name"
test_or_die "failed to copy this script up to the TMP directory. exploit attempted?"
- cd "$TMP"
+ pushd "$TMP" &>/dev/null
+ test_or_die "changing to TMP directory: $TMP"
chmod a+x "$new_name"
test_or_die "chmodding of file: $new_name"
exec "$new_name"
test_or_die "execing cloned getemscript"
+ popd &>/dev/null
fi
##############
#
# push_repo_downstream ~/relay_repo_folder
-#hmmm: make this support multiple dirs?
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh"
+
+##############
dir="$1"; shift
if [ -z "$dir" ]; then
dir=.
fi
-pushd "$dir"
+pushd "$dir" &>/dev/null
+test_or_die "changing to directory: $dir"
# get everything from the origin.
git fetch origin
git push downstream master
test_or_die "running the git push downstream"
-popd
-
+popd &>/dev/null
dir=.
fi
-
pushd "$dir" &>/dev/null
test_or_die "changing to directory: $dir"
tempfile=$(generate_rev_ctrl_filelist)
+test_or_die "generating revision control file list"
popd &>/dev/null
perform_revctrl_action_on_file "$tempfile" do_checkin
pushd "$dir" &>/dev/null
test_or_die "changing directory to: $dir"
tempfile=$(generate_rev_ctrl_filelist)
+test_or_die "generating revision control file list"
popd &>/dev/null
perform_revctrl_action_on_file "$tempfile" do_report_new
# resolves a tree conflict by accepting the "working" version,
# which effectively makes your current change the accepted one.
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+source "$FEISTY_MEOW_SCRIPTS/rev_control/version_control.sh"
+
+##############
+
filename="$1"; shift
+if [ -z "$filename" ]; then
+ echo "This script needs a filename to operate on."
+ exit 1
+fi
+
svn resolve --accept=working "$filename"
test_or_die "resolving tree conflict by accepting the working directory as the right one"
pushd "$dir" &>/dev/null
test_or_die "changing to directory: $dir"
tempfile=$(generate_rev_ctrl_filelist)
+test_or_die "generating revision control file list"
popd &>/dev/null
perform_revctrl_action_on_file "$tempfile" do_update