[CIG-MC] Modifying code

Eh Tan tan2 at geodynamics.org
Thu Aug 2 16:31:49 PDT 2007


Hi Thorsten,

There are several options available.

1) Working outside SVN. You base your work on the released tarball. You
untar it and modify the source code there. You don't have to learn to
use SVN and neither have to worry about keeping up with the development
in CIG. After you have finished the development, you and I can spend
some time to integrate your work with the current code in SVN. But the
final integration with SVN may be very very difficult. This is the least
favorable approach.

2) Working in the SVN trunk. You check out the SVN trunk and start to
hack the code. You regularly update your working copy with the trunk and
check in your modification back to the trunk. Occasionally, there might
be some code conflict (we both modified similar part of the code), but
that is usually easy to fix. When you finish the development, your code
is already nicely integrated with the trunk. This is the preferred
approach if your modification is not destructive, ie. the original
functionally of CitcomS will continue working even when your development
is only halfway. Otherwise, option 3 is preferred.

3) Working in a SVN branch. Similar the option 2, but your code is
checked in to a SVN branch. Any modification to the trunk needs to be
ported to your branch so that the branch and trunk are always
synchronized. The porting has to be done manually and is usually
straightforward. The trunk is not affected by your development, and the
final integration is easy to handle.

The choice depends on your work habit and the nature of your
modification. Since you are already using SVN regularly, the later
factor will probably guide your choice. Let me know which option suits
best for you.


Eh



Thorsten Becker wrote:
> Dear CIG MC staff,
>
> I was wondering how to best go about developing new code that goes
> along with the CitcomS SVN trunk. I would like to add a few subroutines
> and options, test those, and then eventually send them back to CIG to
> see if they get incorporated in the main release. 
>
> I would like to do so without having to reapply the changes every time
> a new svn version is provided. Is there a smart way to set this up with
> the svn, such that I have my own branch (?) of the main tree that gets
> smartly updated? Should I use some sort of patch mechanism and apply the
> same patches on every new release? I am lost in the forest. 
>
> Thanks much for your help!
>
> Thorsten
>
>
>   


-- 
Eh Tan
Staff Scientist
Computational Infrastructure for Geodynamics
2750 E. Washington Blvd. Suite 210
Pasadena, CA 91107
(626) 395-1693
http://www.geodynamics.org



More information about the CIG-MC mailing list