How to transfer code base from one SVN repo to another saved history?

I have a branch in a poorly structured svn repository that needs to be removed and moved to another svn repository. (I'm trying to clean them).

If I do svn log and don't stop at copy / rename, I can see all 3427 commits that I care about. Is there a way to flush revisions without writing some basic scripts?

I would advise on this issue , but this thread has been moved everywhere, and I would also like to keep moving.

+6
svn svnsync svnadmin svndumpfilter
source share
4 answers

I think this may be similar to what @ZacThompson (and @Pekka) means: I think svndumpfilter is your friend.

From your question, I think you have an idea what it should do, but struggle with copying / moving branches everywhere? The answer to this can be found in the previously mentioned SVN documentation , I believe:

In addition, copied paths can give you some trouble. Subversion supports copying operations to the repository, where a new path is created by copying some existing path. It’s possible that at some point in your life, your repository, you may have copied a file or directory from a specific place that svndumpfilter excludes the place it enters. To make dump data self-sufficient, svndumpfilter should show the addition of a new path, including the contents of any files created to copy and not represent this addition as a copy from a source that will not exist in your filtered dump data stream. But since the Subversion repository dump format only shows what has been changed in each revision, the contents of the copy source may not be readily available. If you suspect that you have such copies of this kind in your repository, you may want to rethink your set of included / excluded paths, possibly including the paths that served as your source, there may also be copying problems.

Meaning: make svndumpfilter includes all the paths in which the branch has ever been led. Or am I missing something?

Another possibility could be svndumpfilter2 , mentioned by @compie in the thread you linked, although I believe that this is not even necessary (and I don't know either @compie or svndumpfilter2 ).

+2
source share

You want to use some combination:

  • svnadmin dump
  • svndumpfilter
  • svnadmin download

If you want to make the whole branch, you might not even need svndumpfilter. But if you do this:

http://svnbook.red-bean.com/nightly/en/svn.reposadmin.maint.html#svn.reposadmin.maint.filtering

+1
source share

There is another fairly simple solution and solves the problem of "keep moving . " Please see the last paragraph of the Apache Subversion FAQ article "How to completely delete a file from storage history?" . The solution is independent of svndumpfilter .

You can do the following:

  • Configure authorization rules based on the path for deny access for the USERNAME account to the PATHS file or folder that you want to remove from the repository history.

    Note the plural noun of the path . The file or folder that you want to get rid of may have different names or may be in different places in the history of the repository. Please consider this when setting up the ban rules.

  • Create an empty repository,

  • Replicate the source repository with the svnsync tool to the target repository under the USERNAME account. For more information on synchronizing the repository with svnsync see the SVNBook chapter Repository Replication .

Unlike svndumpfilter , svnsync automatically translates svn copy operations with an unreadable source path into regular additions, which is useful if the history includes copy operations and still needs to be filtered. :)

0
source share

You need to use HotCopy to backup the repository directory. Then you just need to restore the repository.

-2
source share

All Articles