subversion-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Branko ─îibej <br...@wandisco.com>
Subject Re: RFE: copy with metadataOnly should allow removed/replaced sources and added/replaced targets
Date Thu, 23 Apr 2015 14:01:44 GMT
On 22.04.2015 20:28, Marc Strapetz wrote:
> 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

What happens if you do (the API equivalent of):

    $ svn cp --metadata-only b@BASE 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

Same here, I think.

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

Yes, just as the equivalent option for move is not available from the
command-line. Both are API-only features that, IIRC, were added
specifically for GUI clients.

-- Brane


Mime
View raw message