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

Re: Pulling a subdirectory into it's own repository with full history

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: 2006-07-10 13:41:30 CEST

On 7/10/2006 6:27 AM, Terence Lewis wrote:
> Hi,
> I've got a repository that includes a whole bunch of programs all related to
> the same project. However, one of the modules is more reusable than I'd
> originally anticipated, and I'd like to move it out into its own repository
> (I don't want this project to "own" the module anymore). The problem is I'd
> then like to remove it from the old repository and write a script to draw
> the latest version from the new repository. This means I need to carry the
> entire history for the folder into the new repository.
> What is the best way to go about achieving this? My initial ideas are:
> 1) Make a copy on the server of the repository and remove everything except
> this module from the copy. This works, (I've tried it), but I've got a
> situation now where I've got a huge repository with almost 3000 commits in
> it, for a tiny little 16 Kb dll that's going to be reused in other projects.
> I.e it works, but it's ugly, and I have to wade through tons of unrelated
> and confusing commit logs.
> 2) Make a branch in the original repository, and delete everything else out
> of the branch. Then create a new repository and use a svn:externals to make
> the new repository draw the files in from the branch in the old repository.
> 3) Some form of scripted approach where the script can export the successive
> versions of the module from the old repository, and then check them into the
> new repository using the original commit messages.

I think you want to dump the repository, use svnfilter to extract the
bits applying to this subset, and then load those into a new repository.
  This is like 3, but the scripts have already been written.

I'd recommend that you then use svn delete to get rid of it from the
original location, rather than filtering it out of there, but that's
really just a matter of taste.

Duncan Murdoch

> Does anybody have any suggestions or lessons learned I can benefit from?
> Thanks
> Terence Lewis

To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Jul 10 13:42:47 2006

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.