hi bigtop.  evans asked me an interesting question about how to maintain
patches and test them and so on without getting mixed up in the bigtop
patch review process.

testing patches is tricky sometimes in bigtop, esp with so many different
sections of the code base that we work on, and with needing to do things
like create VMs dockerfiles and so on.

This is all i do at the moment: A shell script which takes patch URL as
argument, creates a new git branch, clears vagrant boxes.  If folks have a
workflow in their head, we can use this or something similar to expand upon
for a unified test flow.

or maybe we can think of a creative way to  locally leverage and reuse the
jenkins work folks are doing?


#function to clean vagrant boxes, not in this snippet.
delete_vagrant_boxes
echo "Bigtop patch tester : $0, wgets the patch, applies in a new
unique-named branch"
if [ $# -eq 0 ]; then
   echo "USAGE: Takes patch url as input, applies it in a new branch"
   exit
fi
patch="`echo $1 | rev | cut -d'/' -f 1 | rev`"
echo "PATCH = $patch"
wget $1 -O /tmp/$patch
wc -l /tmp/*patch

echo "Checkout root branch and clean it?"
read x
git checkout jay_dev
git clean -i

echo "apply patch in new branch ?"
read x
git checkout jay_dev
git checkout -b "$patch-`date | tr ' ' '_' | tr ':' '_'`"

echo "apply patch now in this branch `git branch` .... ?"
read x
git am /tmp/$patch
# shows the applied patch.
git log | head




-- 
jay vyas

Reply via email to