Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Record a copy or move that has already occurred using Subversion

Mercurial provides a -A, --after option for moves and copies, which records those operations after they've already occurred.

How can I achieve this using Subversion?

like image 902
Matt Joiner Avatar asked Feb 07 '10 17:02

Matt Joiner


2 Answers

So without a better answer, here's the best mechanism I've come up with:

# file was added
touch a
svn add a
svn ci

# file was moved without versioning
mv a b

# file versioning is added
mv b a
svn mv a b

Keeping in mind you can't svn cp a b, as svn will outright refuse to copy to a target that exists unless it is a directory.

like image 181
Matt Joiner Avatar answered Nov 19 '22 12:11

Matt Joiner


You can't only record it.

What you can do is to do the copy again and overwrite the old copy target.

like image 2
tangens Avatar answered Nov 19 '22 13:11

tangens