[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: RFE: copy with metadataOnly should allow removed/replaced sources and added/replaced targets

From: Branko Čibej <brane_at_wandisco.com>
Date: Thu, 23 Apr 2015 16:01:44 +0200

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_at_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
Received on 2015-04-23 16:03:45 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.