Created
November 1, 2018 13:00
-
-
Save amorgun/c5e1b903a401defe309c56e508f6667f to your computer and use it in GitHub Desktop.
Register moved file in SVN
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
# register file moved without svn mv | |
set -eu | |
shopt -s expand_aliases | |
. ~/.bash_aliases | |
old=$1 | |
new=$2 | |
tmp=$(mktemp svnmove.XXXXXX) | |
svn rm --keep-local "$new" | |
mv "$new" "$tmp" | |
svn revert "$old" | |
svn mv "$old" "$new" | |
mv "$tmp" "$new" | |
echo "Move from $old to $new using $tmp" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment