SVN: Moving repository trunk to another's bran

2020-03-01 11:05发布

问题:

I'm working with an SVN setup with a lot of repositories. I'm trying to consolidate some by moving the trunk of one into the branch of another (the old ones are themed versions of the new one, minus some code fixes I'll be applying later, so it makes sense to me). Short version, I want to go from RepositoryA/trunk to RepositoryB/branches/RepAName.

Ideally, I'd like to maintain the history. I could do an export -> import, but that loses the history and so it isn't ideal. I can't do a dump via svnadmin, since that seems it would overwrite RepositoryB (or fail, but I'm not about to risk losing RepositoryB to find out). So how could I make the move and maintain history, or is it not possible with SVN?

回答1:

After svnadmin dump you can specify the parent directory of your import with svnadmin load --parent-dir <dir>, see the svn manual.