Correct workflow for managing a private Subversion fork:

血红的双手。 提交于 2019-12-21 04:59:36

问题


There is an open source project I would like to fork. It has a public SVN repository from which I would like to check out the source, clone it into my private repository, and begin making changes. If possible I would like to be able to merge changes from the upstream repository in the future. So far I've been able to do it like so:

  1. Create a folder for this project in my own repository.
  2. Check out this empty folder.
  3. Check out the original project into another location.
  4. Delete all .svn subdirectories in this new location.
  5. Copy the files into the working copy of my private repository, commit once, then begin making changes.

This works but it seems ugly and I'm not at all convinced that merge will work correctly. Is there a better way?

EDIT: To preclude replies of "just submit a patch", suffice it to say this is for a feature I need in my application but because it deliberately breaks compatibility with the existing functionality, it will not be accepted upstream.


回答1:


I'm going to recommend that you look at Git.

Yes, the project is using Subversion, but Git has a handy little trick of pulling a revision out of Subversion, allowing you to use Git for your own personal versioning, and then committing your changes back into Subversion.

That would allow you to remain in sync with Subversion, and still take full advantage of a revision control system.

Take a look at git svn.

If you don't want to learn Git (you might as well since most open source projects are moving to it), you can take a look at svk.




回答2:


What you need is called 'Vendor Branches', its well-known workflow.




回答3:


svn export will do most of this for you.



来源:https://stackoverflow.com/questions/5885269/correct-workflow-for-managing-a-private-subversion-fork

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