Last active
August 29, 2015 14:06
-
-
Save nahakiole/51b21e99cdded5491170 to your computer and use it in GitHub Desktop.
Create a patch with the full files from a revision
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
function createSVNPatch { | |
if [ $# -eq 0 ] | |
then | |
echo "No arguments supplied" | |
exit | |
fi | |
svn log -v -r$1 | awk '/\//{print $2}' | sed ""s/$(svn info | grep "Relative" | grep --only-matching -E "/.*" | cut -c 1- | sed -e 's/\//\\\//g')//g"" | cut -c 2- | while read x ; do mkdir -p /tmp/$1/$(echo $x | rev | cut -d'/' -f2- | rev); svn cat -r32804 $x > /tmp/$1/$x ; done && cd /tmp/$1 && zip ~/$1.zip * && cd - | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment