Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Version control on an external project

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?

like image 320
Eldad Mor Avatar asked May 31 '26 12:05

Eldad Mor


1 Answers

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:

  • Fork and synchronize Google Code Subversion repository into GitHub
  • Tracking upstream svn changes with git-svn and github?
  • Best way to fork SVN project with Git

It should be trivial to create a similar setup with mercurial.

like image 61
Martijn Pieters Avatar answered Jun 03 '26 04:06

Martijn Pieters