Using copy with the new metadataOnly option (through the API) only allows to "move" or "copy" a missing file onto an unversioned file. It could also be helpful to copy/move metadata from a removed (or replaced) source to an already added (or replaced) target.

Use case 1: the user has removed file "a" and moved file "b" to file "a" without using SVN:

$ svn status
M a
! b

Goal is to preserve "b"'s history for the new "a" and have the history of the old "a" being ended. With metadataOnly being more tolerant, this could then be done by:

$ svn rm --keep-local a
$ svn add a
$ svn cp --metadata-only b a


Use case 2: the user has moved file "a" to file "b" and created a new file "a" without using SVN:

$ svn status
M a
? b

Goal is to preserve old "a"'s history for "b" and start a new history for new "a". With metadataOnly being more tolerant, this could then be done by:

$ svn rm --keep-local a
$ svn add a
$ svn cp --metadata-only a b


Btw, currently "svn help cp" does not show a "--metadata-only" option at all. Is this option intentionally not available from command line?

-Marc

Reply via email to