I am working on an enormous project (“the project”) which is open-source, and I am changing the project but don’t have a permission to commit. I’m looking for strategies for maintaining my own branch of the project. Some issues I am contemplating:
- How to put my own work in a version control system, given that I’m altering the project’s source code, adding new files and so on.
- How to keep in sync with the project without having to manually merge my own changes over and over again.
I’ve never been in this situation – I’ve always maintained my complete project in some version control system. My plan right now is something like that:
- Creating a directory tree in my SVN, similar to the one in the project.
- Keeping all the changed files (and only them) in my svn.
- Every time I decide to sync with the new baseline of the project, I’ll do a checkout, merge my svn tree into the new version, test, then commit my changes to my svn and distribute them along with the latest project baseline.
The problems here are ENDLESS. Way too many manual steps, more and more work over time, and so on. The correct way to go would be, of course, to be a part of the original project, but this seems to be quite irrelevant right now for various reasons and is out of the question.
Ideas?
I’d use git or mercurial for this; simply import the project into git or mercurial, and merge the upstream changes into a branch in your project for easy merging into your trunk.
If the upstream project has a repository of their own, the import is even easier. Both git and mercurial have support for directly importing other version control systems. I did this recently to adapt an existing project that lives in SVN: https://github.com/mjpieters/rod.recipe.rabbitmq
Note that that project has an ‘upstream’ branch. That particular project has now accepted my proposed changes after reviewing the changes in github.com.
There are a few questions here on SO on the subject:
It should be trivial to create a similar setup with mercurial.