Skip to content

Instantly share code, notes, and snippets.

@amorgun
Created November 1, 2018 13:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save amorgun/c5e1b903a401defe309c56e508f6667f to your computer and use it in GitHub Desktop.
Save amorgun/c5e1b903a401defe309c56e508f6667f to your computer and use it in GitHub Desktop.
Register moved file in SVN
# 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