3

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:

  1. 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.
  2. 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:

  1. Creating a directory tree in my SVN, similar to the one in the project.
  2. Keeping all the changed files (and only them) in my svn.
  3. 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?

Eldad Mor
  • 5,405
  • 3
  • 34
  • 46
  • What version control system does the project use? Do you have read access to the project's source control? How to handle this would be very different if they use svn, cvs, hg, git or something else. – Anders Abel May 24 '11 at 17:30
  • @Anders: they have both git and svn. And yes, I have read access to the project VCS. – Eldad Mor May 24 '11 at 18:01

2 Answers2

4

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.

Community
  • 1
  • 1
Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
1

You can use git to maintain your source control on your local system. In fact Git can be used to maintain just about any directory under version control. There is no need to sync to anything, git maintains all changes locally.

If you need to commit to SVN check out the documentation http://git-scm.com/docs/git-svn

uglydawg
  • 321
  • 3
  • 4