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?
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?
You can't only record it.
What you can do is to do the copy again and overwrite the old copy target.
Subversion only supports recording merges after the fact, not copies and/or moves...
Bluntly, no, there's no way to do this in Subversion. Assuming you've made no other changes, what you probably want to do is an svn revert
and then do an svn copy
so Subversion knows you've copied the file. Or if you don't really care about history for a copied file, just svn add
the new location.
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.