Created
January 30, 2013 20:07
-
-
Save thurloat/4676387 to your computer and use it in GitHub Desktop.
svn stash, like git?
This file contains hidden or 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
# named svn stashes. | |
# ex: svn_stash foo -- stashes all changes in a patch named .stash-foo | |
# ex2: svn_stash pop foo -- patches the foo stash back onto svn. | |
function svn_stash() { | |
if [ -z "$1" ] | |
then | |
echo "Missing stash name argument" | |
else | |
if [ "$1" == "pop" ] | |
then | |
local stashname=".stash-$2" | |
patch -p0 < $stashname; rm $stashname | |
else | |
svn diff > .stash-$1; svn revert -R . | |
fi | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You should try git svn again. With an up-to-date svn server it works flawlessly.