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

Re: Server side copy, will history be copied too?

From: Lorenz <lorenznl_at_yahoo.com>
Date: Mon, 30 Sep 2019 05:38:12 +0000

Nathan Hartman wrote:

>On Fri, Sep 27, 2019 at 12:51 PM Bo Berglund <bo.berglund_at_gmail.com> wrote:
>>
>> I need to create a project in the repository where I will use files that have been worked on in different test projects. All projects are part of the same repository.
>>
>> So in the new project I will have both new files and files from two existing projects within the repository.
>> I know I could export the existing files into a directory on the client and collect the
>> old and new files here and then create the new project from this directory.
>> But then there is no history available for the old files preceding the current time...
>>
>> I wonder if I will get the history along with the files if I make a server side copy:
>>
>> svn cp <oldprojecturl>/filename <newprojecturl>/filename
>>
>>
>>
>> Best Regards,
>>
>> Bo Berglund
>
>Short answer: Yes.
>
>Long answer: A server side copy is the same mechanism you use to make
>branches and tags. Subversion doesn't really care about the reason for
>the copy; it automatically follows the line of history, for example if
>you later do 'svn log filename' (unless you use the --stop-on-copy
>argument to svn log).

if you want to reduce the number of commits (1 per file copy) when
doing the copying as you show above, you can also collect your files
in a working copy and commit only once.
Or you can use svnmucc get the same result but avoid the working copy.

-- 
Lorenz
Received on 2019-09-30 07:39:46 CEST

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