You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Jon Froehlich <jo...@gmail.com> on 2009/01/29 17:48:38 UTC

Creating a new SVN Projects from Directories in Another SVN Project

This might sound like a weird request but here's what I need to do: I
have a SVN project that has been ongoing for about a year (so it has
significant change history). A subdirectory within that project has
now evolved into a larger project on its own. I would like to pull out
this subdirectory and make a new SVN project around it and, hopefully,
maintain its original change history.

I know that I could simply create a new SVN project and commit the
most recent version of this directory but then I would lose its change
history. This is what I'll do if I don't hear of other
recommendations.

Thanks in advance,

Jon

-- 
Jon Froehlich
PhD Student
Computer Science and Engineering
University of Washington
http://www.cs.washington.edu/homes/jfroehli
http://sustain.cs.washington.edu/blog/

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1069478

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Creating a new SVN Projects from Directories in Another SVN Project

Posted by Ryan Schmidt <su...@ryandesign.com>.
No; if you want the project to move to its own separate repository,  
then you must dump/filter/load like Hari explained in another email  
in this thread.

On Jan 29, 2009, at 12:25, Jon Froehlich wrote:

> Hi David,
>
> Thanks for your response. Would this work if each of the projects in
> our file system have been created with svnadmin create <project name>.
> That is to say, I want to make
> "sub-directory-that's-becoming-a-project" into a:
>
> svnadmin create sub-directory-that's-becoming-a-project
>
> but maintain its history somehow.
>
> Jon
>
> On Thu, Jan 29, 2009 at 10:00 AM, David Weintraub  
> <qa...@gmail.com> wrote:
>> Why not simply do a "svn mv" to move this subdirectory to the
>> directory where projects are stored. For example:
>>
>> http://system/svn/projects/big_project/trunk/sub-directory-that's- 
>> becoming-a-project
>>
>> $ svn mkdir http://system/svn/projects/new-project/trunk
>> $ svn mv http://system/svn/projects/big_project/trunk/sub- 
>> directory-that's-becoming-a-project
>> svn mv http://system/svn/projects/new-project/trunk
>>
>> Something like that. You get the idea. Then, you can create an
>> svn:external to where this sub-directory use to live.
>>
>> This way, you keep the entire history.
>>
>> On Thu, Jan 29, 2009 at 12:48 PM, Jon Froehlich  
>> <jo...@gmail.com> wrote:
>>> This might sound like a weird request but here's what I need to  
>>> do: I
>>> have a SVN project that has been ongoing for about a year (so it has
>>> significant change history). A subdirectory within that project has
>>> now evolved into a larger project on its own. I would like to  
>>> pull out
>>> this subdirectory and make a new SVN project around it and,  
>>> hopefully,
>>> maintain its original change history.
>>>
>>> I know that I could simply create a new SVN project and commit the
>>> most recent version of this directory but then I would lose its  
>>> change
>>> history. This is what I'll do if I don't hear of other
>>> recommendations.
>>>
>>> Thanks in advance,
>>>
>>> Jon
>>>
>>> --
>>> Jon Froehlich
>>> PhD Student
>>> Computer Science and Engineering
>>> University of Washington
>>> http://www.cs.washington.edu/homes/jfroehli
>>> http://sustain.cs.washington.edu/blog/
>>>
>>> ------------------------------------------------------
>>> http://subversion.tigris.org/ds/viewMessage.do? 
>>> dsForumId=1065&dsMessageId=1069478
>>>
>>> To unsubscribe from this discussion, e-mail: [users- 
>>> unsubscribe@subversion.tigris.org].
>>>
>>
>>
>>
>> --
>> --
>> David Weintraub
>> qazwart@gmail.com
>>
>
>
>
> -- 
> Jon Froehlich
> PhD Student
> Computer Science and Engineering
> University of Washington
> http://www.cs.washington.edu/homes/jfroehli
> http://sustain.cs.washington.edu/blog/
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do? 
> dsForumId=1065&dsMessageId=1069613
>
> To unsubscribe from this discussion, e-mail: [users- 
> unsubscribe@subversion.tigris.org].

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1070017

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Creating a new SVN Projects from Directories in Another SVN Project

Posted by Jon Froehlich <jo...@gmail.com>.
Hi David,

Thanks for your response. Would this work if each of the projects in
our file system have been created with svnadmin create <project name>.
That is to say, I want to make
"sub-directory-that's-becoming-a-project" into a:

svnadmin create sub-directory-that's-becoming-a-project

but maintain its history somehow.

Jon

On Thu, Jan 29, 2009 at 10:00 AM, David Weintraub <qa...@gmail.com> wrote:
> Why not simply do a "svn mv" to move this subdirectory to the
> directory where projects are stored. For example:
>
> http://system/svn/projects/big_project/trunk/sub-directory-that's-becoming-a-project
>
> $ svn mkdir http://system/svn/projects/new-project/trunk
> $ svn mv http://system/svn/projects/big_project/trunk/sub-directory-that's-becoming-a-project
> svn mv http://system/svn/projects/new-project/trunk
>
> Something like that. You get the idea. Then, you can create an
> svn:external to where this sub-directory use to live.
>
> This way, you keep the entire history.
>
> On Thu, Jan 29, 2009 at 12:48 PM, Jon Froehlich <jo...@gmail.com> wrote:
>> This might sound like a weird request but here's what I need to do: I
>> have a SVN project that has been ongoing for about a year (so it has
>> significant change history). A subdirectory within that project has
>> now evolved into a larger project on its own. I would like to pull out
>> this subdirectory and make a new SVN project around it and, hopefully,
>> maintain its original change history.
>>
>> I know that I could simply create a new SVN project and commit the
>> most recent version of this directory but then I would lose its change
>> history. This is what I'll do if I don't hear of other
>> recommendations.
>>
>> Thanks in advance,
>>
>> Jon
>>
>> --
>> Jon Froehlich
>> PhD Student
>> Computer Science and Engineering
>> University of Washington
>> http://www.cs.washington.edu/homes/jfroehli
>> http://sustain.cs.washington.edu/blog/
>>
>> ------------------------------------------------------
>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1069478
>>
>> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
>>
>
>
>
> --
> --
> David Weintraub
> qazwart@gmail.com
>



-- 
Jon Froehlich
PhD Student
Computer Science and Engineering
University of Washington
http://www.cs.washington.edu/homes/jfroehli
http://sustain.cs.washington.edu/blog/

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1069613

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Creating a new SVN Projects from Directories in Another SVN Project

Posted by David Weintraub <qa...@gmail.com>.
Why not simply do a "svn mv" to move this subdirectory to the
directory where projects are stored. For example:

http://system/svn/projects/big_project/trunk/sub-directory-that's-becoming-a-project

$ svn mkdir http://system/svn/projects/new-project/trunk
$ svn mv http://system/svn/projects/big_project/trunk/sub-directory-that's-becoming-a-project
svn mv http://system/svn/projects/new-project/trunk

Something like that. You get the idea. Then, you can create an
svn:external to where this sub-directory use to live.

This way, you keep the entire history.

On Thu, Jan 29, 2009 at 12:48 PM, Jon Froehlich <jo...@gmail.com> wrote:
> This might sound like a weird request but here's what I need to do: I
> have a SVN project that has been ongoing for about a year (so it has
> significant change history). A subdirectory within that project has
> now evolved into a larger project on its own. I would like to pull out
> this subdirectory and make a new SVN project around it and, hopefully,
> maintain its original change history.
>
> I know that I could simply create a new SVN project and commit the
> most recent version of this directory but then I would lose its change
> history. This is what I'll do if I don't hear of other
> recommendations.
>
> Thanks in advance,
>
> Jon
>
> --
> Jon Froehlich
> PhD Student
> Computer Science and Engineering
> University of Washington
> http://www.cs.washington.edu/homes/jfroehli
> http://sustain.cs.washington.edu/blog/
>
> ------------------------------------------------------
> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1069478
>
> To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].
>



-- 
--
David Weintraub
qazwart@gmail.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1069509

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].

Re: Creating a new SVN Projects from Directories in Another SVN Project

Posted by Hari Kodungallur <hk...@gmail.com>.
On Thu, Jan 29, 2009 at 9:48 AM, Jon Froehlich <jo...@gmail.com>wrote:

> This might sound like a weird request but here's what I need to do: I
> have a SVN project that has been ongoing for about a year (so it has
> significant change history). A subdirectory within that project has
> now evolved into a larger project on its own. I would like to pull out
> this subdirectory and make a new SVN project around it and, hopefully,
> maintain its original change history.
>
> I know that I could simply create a new SVN project and commit the
> most recent version of this directory but then I would lose its change
> history. This is what I'll do if I don't hear of other
> recommendations.
>
>
Dump your current repository (entire repository) using svnadmin dump. Then
filter out the subdirectory from the dump file using svndumpfilter. Then
reload the filtered out dump file to a new repository.

This way you should be able to create a new repository and keep the history.


   - svnadmin dump /current/repository > /tmp/repo.dump
   - cat /tmp/repo.dump | svndumpfilter include --drop-empty-revs
   --renumber-revs subdir/ > /tmp/new.dump
   - svnadmin create /new/repository
   - cat /tmp/new.dump | svnadmin load /new/repository


Thanks,
-Hari

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=1069515

To unsubscribe from this discussion, e-mail: [users-unsubscribe@subversion.tigris.org].