Source Code Revision Control Software CVS and Subversion (svn)

17
Source Code Revision Control Software CVS and Subversion (svn)

Transcript of Source Code Revision Control Software CVS and Subversion (svn)

Page 1: Source Code Revision Control Software CVS and Subversion (svn)

Source Code Revision Control

Software

CVS and Subversion (svn)

Page 2: Source Code Revision Control Software CVS and Subversion (svn)

Would these tools be useful for Noah development efforts?

Page 3: Source Code Revision Control Software CVS and Subversion (svn)

Why use revision control software?

Concurrent development for multiple users

working from a single source-code base

History (logging; revert to older versions)

Tagging (version identification)

Branching (merging)

Archive (just archive the repository)

Page 4: Source Code Revision Control Software CVS and Subversion (svn)

Caveats

Revision control software is not a replacement

for: Developer communication, cooperation

Code development project management

Good habits on the part of code developers Meaningful log entries (change logs)

Code development habits

Page 5: Source Code Revision Control Software CVS and Subversion (svn)

Typical use

Checkout code from the central repository

Do your work make your modifications

possibly add source-code files

do your testing

etc.

Commit your changes to the central repository Include a mandatory log entry describing your

changes

Page 6: Source Code Revision Control Software CVS and Subversion (svn)

More typical use

Update your working code to include changes

that others have comitted

Merge conflicting changes

Export code for release

Tag a specific snapshot of the code (i.e., a

named version for release)

Page 7: Source Code Revision Control Software CVS and Subversion (svn)

More typical use

View file history, change logs

Make branches for more independent

development

Merge branches back into main code base

Page 8: Source Code Revision Control Software CVS and Subversion (svn)

CVS or Subversion?

At the level for basic usage, they are very

similar The goal of the Subversion project was to make a

near-lookalike replacement for CVS users

Page 9: Source Code Revision Control Software CVS and Subversion (svn)

Similarities Similar workflow, similar user commands

(Though I found branching and tags seemed to

make a lot more sense in Subversion)

Each has readable, useful users’ guides online

Each has a wide user base Used by many high-profile projects

Actively maintained

Open source

Page 10: Source Code Revision Control Software CVS and Subversion (svn)

Reasons to choose Subversion for

Noah development? SVN has a newer code base than CVS

Advantage? Disadvantage?

SVN seems to have more active development

Advantage? Disadvantage?

SVN has better file renaming capabilities

SVN handles symbolic links

SVN used at NCAR for WRF development, at NCEP for NMM

development

SVN seems to have more sensible tags and branches

Page 11: Source Code Revision Control Software CVS and Subversion (svn)

Reasons to choose CVS for Noah

development? Long history

RAL has a central CVS repository There has been talk of having a central RAL

Subversion repository

Would Noah development take advantage of RAL

central repository?

Page 12: Source Code Revision Control Software CVS and Subversion (svn)

CVS or Subversion?

More important question:

Would software version control through some

central repository be useful for Noah LSM

development

Page 13: Source Code Revision Control Software CVS and Subversion (svn)

Discussion points

Would such tools be useful for Noah development efforts? Are the Noah development efforts coordinated enough to make

use of a centralized, single, repository? Multiple institutions (firewall issues?)

Divergent interests and development directions

Would Noah development be better suited by each group maintaining independent code?

Periodic merging efforts to produce a new “unified” release

Then every group starts again with their own development from that common release

Each group responsible for its own code maintenance strategies

Page 14: Source Code Revision Control Software CVS and Subversion (svn)

Online Documentation

Subversion http://svnbook.red-bean.com

CVS http://cvsbook.red-bean.com

http://ximbiot.com/cvs/manual

Page 15: Source Code Revision Control Software CVS and Subversion (svn)

Differences (at the user level) Revision numbers

CVS version numbers apply to files

Subversion version numbers apply to the repository

Directory versioning CVS does not apply revision numbers to directories

Subversion revision numbers apply to the repository, and so to any directories in the repository

Branches and tags Subversion branches and tags are simply copies of the repository filesystem

CVS branches and tags get complicated

Properties Subversion allows arbitrary metadata tags to be applied to files

Page 16: Source Code Revision Control Software CVS and Subversion (svn)

Release 1.0 Release 2.0

Page 17: Source Code Revision Control Software CVS and Subversion (svn)

Release 1.0 Release 2.0

Concerted merge effort