Server side copy, will history be copied too?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Server side copy, will history be copied too?

Bo Berglund
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



Reply | Threaded
Open this post in threaded view
|

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

Nathan Hartman
On Fri, Sep 27, 2019 at 12:51 PM Bo Berglund <[hidden email]> 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).
Reply | Threaded
Open this post in threaded view
|

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

Lorenz-2
Nathan Hartman wrote:

>On Fri, Sep 27, 2019 at 12:51 PM Bo Berglund <[hidden email]> 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

Reply | Threaded
Open this post in threaded view
|

unsubscribe

Paul Decker
In reply to this post by Nathan Hartman
Reply | Threaded
Open this post in threaded view
|

unsubscribe

Paul Decker

unsubscribe