Skip to content

Instantly share code, notes, and snippets.

@ybelleguic
Created February 13, 2020 09:45
Show Gist options
  • Save ybelleguic/00700ea374cbb062d26294fc12ea0b9a to your computer and use it in GitHub Desktop.
Save ybelleguic/00700ea374cbb062d26294fc12ea0b9a to your computer and use it in GitHub Desktop.
#!/bin/bash
#inspired from https://github.com/thenigan/git-diffall
#!/bin/sh
ROOTDIR=/tmp/svndifftool
LEFT=$ROOTDIR/left
RIGHT=$ROOTDIR/right
mkdir -p $LEFT
mkdir -p $RIGHT
trap 'rm -rf $ROOTDIR' EXIT
for i in $(svn st | awk '{print $NF}'); do
cp --parents $i $LEFT
ORIG=$(svn cat -r HEAD $i 2> /dev/null)
if [ $? -eq 0 ] ; then
mkdir -p $RIGHT/$(dirname "$i")
echo "$ORIG" > $RIGHT/$i
fi
done
meld $LEFT $RIGHT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment