Last active
January 10, 2017 22:45
-
-
Save mackrorysd/72f2e6817156181b3d1257c0dc7719c6 to your computer and use it in GitHub Desktop.
Generate diff to evaluate wire compatibility between Hadoop versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
cd /tmp | |
OLD=branch-2.7 | |
NEW=trunk | |
mkdir new | |
mkdir old | |
git clone git://git.apache.org/hadoop.git | |
function gather_protos() { | |
SOURCE=${1} | |
TARGET=${2} | |
for proto in $(cd ${SOURCE} && find . -name \*.proto | sed -e 's|^\./||'); do | |
#flattened=${proto//\//_} # Trips up on files that moved | |
flattened=$(basename ${proto}) | |
cp ${SOURCE}/${proto} ${TARGET}/${flattened} | |
done | |
} | |
(cd hadoop; git checkout ${OLD}) | |
gather_protos hadoop old | |
(cd hadoop; git checkout ${NEW}) | |
gather_protos hadoop new | |
meld old new |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment