How do I export a part of an SVN repository with dependencies?

旧街凉风 提交于 2019-11-30 19:44:30

问题


I am trying to migrate a part of an SVN repository using svnadmin dump.

The provided svndumpfilter tool doesn't manage copy/move/rename dependencies from directories not included in the export.

Is there a tool which can manage these dependencies?


回答1:


I found a Python script by Simon Tatham called svndumpfilter2, which tries to cope with simple dependencies (I found some limitations, though).

You can also check an article about his migration to Subversion and the motivation for the script.




回答2:


With dependencies you mean those specified by the property svn:external?

If yes, I think you should pass to svndumpfilter also the paths referrend in the property. For example, if your project is in http://host/project and the svn:external property is set to http://host/dependencies you can do something like

svndumpfilter include http://host/project http://host/dependencies < total.dump > project.dump



回答3:


You cannot get rid of this problem. If you copied a directory/file, you have to include both (source and destination) into svndumpfilter.

However, you can do some tricks:

If you dump a repository not from revision 0, but say e.g. from revision 100, you will get a new repository with revision 1-100 vanished. However, your destination repository has all files/folders in revision 1 as your source repository in revision 100. In this way you can get rid of versioned data without losing the HEAD-Revision.

You can try to dump/load your source repository until your first copy into a "flat" repository, then add the remaining dumps onto it. In this way you can skip the troublesome copy-from revision, as your files are already in the fitting (destination) directory.



来源:https://stackoverflow.com/questions/258473/how-do-i-export-a-part-of-an-svn-repository-with-dependencies

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!