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

Re: when to use svn copy

From: Stefan Sperling <stsp_at_elego.de>
Date: Tue, 25 Jan 2011 13:03:37 +0100

On Tue, Jan 25, 2011 at 11:36:02AM -0000, Echlin, Jamie wrote:
> > But doing copy operations within a branch root (i.e. they
> > don't cross branch boundaries) is fine.
>
> Is a copy, as opposed to a rename/move really fine? I'm not sure why
> people would want two files in the same branch to share a common
> history. In this case, what I believe happens is that people svn copy an
> existing class (or whatever) as the basis of a new class, when a
> filesystem copy and Add might be more appropriate. Anyway, I think this
> process is indicative of other problems in the development lifecycle.

It's not necessarily a problem.
Deriving things from one another, preserving history, is a valid use case.
This is a pretty good thing to do actually since it preserves e.g. accuracy
of svn blame output.

And it can happen naturally during refactoring.
For example, you might want to split a file into two distinct files,
preserving their common history.

But also, a rename is a copy+delete. So when we talk about copies around
here that usually includes renames :)

Stefan
Received on 2011-01-25 13:04:21 CET

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

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