Print

Print


Hi,

I am generally concerned with all the changes flying around in hps-java trunk lately that most people are not using proper version control tactics to manage their work.  We should generally be branching the code far more often in order to avoid making trunk very unstable, which it has been lately.  In fact, I would suggest that every major JIRA item which requires more than a few lines of code get its own branch where the work is entirely isolated from trunk until it is completed.  This might seem excessive, but it has advantages (listed below) and branches can be deleted after we are done with them.

Branching has many advantages such as....

1) Complete isolation of any potentially 'breaking' changes from trunk.  Commits made to a branch do not affect trunk at all.

2) Complete isolation from you getting unwanted changes into your branch unless you merge them in yourself.  You can manage yourself which trunk changes get pulled into your branch if some are needed.

3) The ability to make incremental commits to the branch to save your work periodically, which might make it unstable/broken, with no affect on trunk.

4) The proper accumulation of history/log files attached to the correct files/nodes in the SVN repo as you make commits.

To branch from a copy of hps-java, assuming you are working on JIRA item HPSJAVA-1234 (just a dummy name) .....

$ cd trunk; svn cp ^/java/trunk ^/java/branches/HPSJAVA-1234

Now you can make a new Eclipse workspace for the branch....

$ mkdir workspace.HPSJAVA-1234; svn co svn://svn.freehep.org/hps/java/branches/HPSJAVA-1234

Then switch to the workspace in Eclipse and use the usual 'Import' menu item to load all the Maven modules from the 'HPSJAVA-1234' directory into that workspace.

Now you have an entirely separate workspace for that branch to keep it separate from your work on trunk.

Then when you're ready to merge back in to trunk....

cd trunk; svn merge ^/java/branches/HPSJAVA-1234 .

What I've described works well  in terms of managing changes and working on tasks in JIRA.

In particular, whatever you do, please *do not* manually copy/fork files from the hps-java modules into your user area and then modify them there with the intension of copying them back over the primary file at some point.  This has all kinds of problems with it that are avoid by using proper branches for your work.

Thanks.

--Jeremy

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the HPS-SOFTWARE list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=HPS-SOFTWARE&A=1