Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
396 views
in Technique[技术] by (71.8m points)

tortoisesvn - SVN move single directory into other repository (with history)

Related question: Moving repository trunk to another’s branch (with history)


I know that one can dump a complete SVN repository with history and load it into a user-defined (sub)directory of the target repository using:

// in source repo
> svnadmin dump . > mydumpfilename

// in destination repo (backslashes because I'm using Windows)
> svnadmin load . < mydumpfilename --parent-dir somesubdirectory

But this will import the full repository into the target repository's sub-directory. What I want is to define a sub-directory in the source repository that should be exported. Something like svnadmin dump . --source-path oldsubdir > mydumpfilename.

How can I achieve that? If TortoiseSVN can do that, please say so ;)


SOLUTION: Thanks to Tim Henigan's answer, here's the correct way to do it:

// execute in destination repo
svndumpfilter include sourcesubdir < mydumpfilename | svnadmin load . --parent-dir destinationsubdir

Hope this will help others, too...

question from:https://stackoverflow.com/questions/2337470/svn-move-single-directory-into-other-repository-with-history

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Check out svndumpfilter and this section on Repository Maintenance.

Once you have a dumpfile for the entire old repository, you can use svndumpfilter to extract just the portion that you want.

I am not aware of a way to do this with TortoiseSVN.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...