Record a copy or move that has already occurred with Subversion

Mercurial provides an option -A, --afterfor moves and copies that records these operations after they have already occurred.

How can I achieve this with Subversion?

+5
source share
4 answers

So, without a better answer, here is the best mechanism I came 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

Remember that you cannot svn cp a b, as you svnwill completely refuse to copy the target, which exists if it is not a directory.

+2
source

You can not only record it.

What you can do is repeat the copy and overwrite the old copy.

+2
source

Subversion , / ...

0

Honestly, no, there is no way to do this in Subversion. Assuming you have not made any other changes, what you probably want to do is svn revertand then execute svn copy, so Subversion knows that you copied the file. Or, if you do not care about the history for the copied file, just a svn addnew location.

0
source

All Articles