Download as pdf or txt
Download as pdf or txt
You are on page 1of 19

Open Subversion Repository

Access For OpenFOAM

Martin Beaudoin, Hydro Québec


Bernhard Gschaider, ICE Strömungforschung GmbH
Hrvoje Jasak, Wikki Ltd
Håkan Nilsson, Chalmers University of Technology

Second OpenFOAM Workshop, Zagreb, 7-9 June 2007


Outline of the presentation
¾ Why Version Control for source code ?
¾ What is Version Control
¾ What is Subversion?
¾ Why a Subversion site for OpenFOAM?
¾ Openfoam-extend on SourceForge
¾ Proposed structure for the svn archive
¾ Subversion basic working cycle
¾ Browsing the Subversion archive
¾ Conclusion

Second OpenFOAM Workshop


2
Zagreb 7-
7-9 June 2007
Why Version Control for source code?
¾ Questions that are asked at every software project:
ƒ “Is the latest version in the Folder Devel or Debug?”
ƒ “Who copied an old version over my changes?”
ƒ “Who wrote that stuff? And what was he thinking?”
ƒ “Cool feature. Who wrote that? Me? When?”
ƒ “It worked 3 weeks ago. What changed in the meantime?”
ƒ “Could I have an up-to-date copy of the source code?”
ƒ “Someone found a bug in Release 10.4 of my software. My
new version 10.5 is not ready for release yet! Where is the
source code for version 10.4 again?”
ƒ “Who wants to merge versions?”

¾ Version Control tools can help here.

Second OpenFOAM Workshop


3
Zagreb 7-
7-9 June 2007
What is Version Control?
¾ Version control is the management of information
changes in respect of time.
¾ Version control organizes the work of multiple authors.
¾ Widely used in software development and engineering.
¾ Version control systems keep track of multiple versions
of multiples files of multiple projects.
¾ Many systems are available out there:
ƒ RCS
ƒ Microsoft SourceSafe
ƒ BitKeeper
ƒ CVS
ƒ Subversion
ƒ …

Second OpenFOAM Workshop


4
Zagreb 7-
7-9 June 2007
What is Subversion?
¾ The goal of the Subversion project is to build a version
control system that is a compelling replacement for CVS in
the open source community.
¾ A Subversion site :
ƒ Is a centralized repository for storing and sharing data (files,
source code, documents, etc).
ƒ Is built on a hierarchy of files and directories
ƒ Offers version control of files AND directories
ƒ Is a Client/Server system
ƒ Enables the collaborative editing and sharing of source code.
ƒ Is Operating System agnostic
ƒ Can store meta-data (key/value pairs) for files and directories
ƒ Is a replacement for the now aging CVS

Second OpenFOAM Workshop


5
Zagreb 7-
7-9 June 2007
What is Subversion?
¾ The advantages of Subversion versus CVS
ƒ Versioning of files, directories and symbolic links
– Creating, Renaming, Moving and Deleting
ƒ Atomic commits
ƒ Repository-wide version numbering
ƒ Efficient handling of binary files
ƒ Can be hosted over HTTP/HTTPS
ƒ SVN is faster than CVS
ƒ Cheap or lazy copy mechanism

Second OpenFOAM Workshop


6
Zagreb 7-
7-9 June 2007
What is Subversion?
¾ For more information:
ƒ Subversion home site:
– http://subversion.tigris.org/

ƒ On-line electronic book:


– Version Control with Subversion, Collins-Sussman,
Fitzpatrick, Pilato
– http://svnbook.red-bean.com

ƒ On-line tutorials and training:


– Subtrain by POLARION:
– http://www.polarion.org/index.php?page=download&project=subtrain

Second OpenFOAM Workshop


7
Zagreb 7-
7-9 June 2007
Why a Subversion site for OpenFOAM
¾ For the OpenFOAM users:
ƒ The patches and bug fixes are currently published over
the OpenFOAM discussion forum or mailing list:
– patching OpenFOAM source code is a do-it-yourself job in
between releases.
ƒ With version control, you can see where, when, and by
whom the OpenFOAM source code has been modified.
ƒ Some very interesting add-on packages are available on
a few external sites : a centralized access point would
be very convenient.
ƒ Experimental versions of OpenFOAM will be easier to
download and test.

Second OpenFOAM Workshop


8
Zagreb 7-
7-9 June 2007
Why a Subversion site for OpenFOAM
¾ For the OpenFOAM developers:
ƒ We need a centralized archive for sharing source code
and facilitate collaboration.
ƒ We need incremental download of modified files instead
of downloading large monolithic tarballs (.tgz)
ƒ We need a powerful tool to detect and track source code
modifications from release to release.
ƒ “Unsupported” code can now have a home.

Second OpenFOAM Workshop


9
Zagreb 7-
7-9 June 2007
Openfoam-extend on SourceForge
¾ A new project has been registered on SourceForge
for the OpenFOAM community: openfoam-extend
¾ SourceForge: more than just a Subversion archive
ƒ SourceForge.net is by far the most popular site for
sharing source code over the Internet.
ƒ A project hosted on SourceForge also gets access to:
– Mailing lists for project users and administrators
– Tools for submitting bug reports, support requests, feature
requests, user-submitted patches.
– Forums
– Web based source code browsing

Second OpenFOAM Workshop


10
Zagreb 7-
7-9 June 2007
Proposed structure for the svn archive

https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend

trunk/ Core/
Forge/

Breeder/

ƒ Trunk: main line of development. “Work in progress”, so wear protective gear at all times
¾ Core : ƒ Structured like the original OpenFOAM distribution
ƒ Content: what currently is known as “Hrv’s development version”.
ƒ Permanent beta, with intermediate stable releases

¾ Forge: ƒ Assorted collection of utilities, libraries and other stuff OF-related.


ƒ Fulfill some quality standards.
ƒ Should provides test cases and documentation. Ideally version agnostic.

¾ Breeder: ƒ Things that are not ready to go to the Forge yet.


ƒ Where people can have a first go at the development.
ƒ Playground for starting collaborations and workgroups
ƒ Minimal or no test cases/documentation

Second OpenFOAM Workshop


11
Zagreb 7-
7-9 June 2007
Proposed structure for the svn archive

https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend

Release_2006_07_28/
tags/ Core/ Release_2007_06_10/
Forge/ Current/
Breeder/

ƒ Tags: snapshots of the trunk. Consistent, relatively bug-free: Releases


ƒ Core :
ƒ Release_YYYY_MM_DD, or whatever numbering
ƒ Forge: scheme that makes sense.
ƒ Breeder: ƒ Current : Always points to the latest stable released
version

Second OpenFOAM Workshop


12
Zagreb 7-
7-9 June 2007
Proposed structure for the svn archive

https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend

branches/ OpenCFD_Release OpenFOAM_1.4


Experimental_Core

OpenFOAM_1.4_patch1

ƒ Branches: variations of the trunk


ƒ We need a place for an up-to-date patched version of OpenCFD releases
ƒ We need a convenient way to browse the source code and compare changes from release
to release
ƒ We need a place for “highly experimental” developments that will be merged into the trunk
when stable.

Second OpenFOAM Workshop


13
Zagreb 7-
7-9 June 2007
Proposed structure for the svn archive

https://openfoam-extend.svn.sourceforge.net/svnroot/openfoam-extend

trunk/ Core/
Forge/

Breeder/

Release_2006_07_28/
tags/ Core/ Release_2007_06_10/
Forge/ Current/
Breeder/

branches/ OpenCFD_Release OpenFOAM_1.4

Experimental_Core

OpenFOAM_1.4_patch1

Second OpenFOAM Workshop


14
Zagreb 7-
7-9 June 2007
Subversion basic working cycle

From: “Subversion – Cheatsheet”, Subtrain, by Polarion

¾ A “Howto” guide will be made available to illustrate the most common


operations when working with the Subversion archive.

Second OpenFOAM Workshop


15
Zagreb 7-
7-9 June 2007
Browsing the Subversion archive

Second OpenFOAM Workshop


16
Zagreb 7-
7-9 June 2007
Browsing the Subversion archive

Second OpenFOAM Workshop


17
Zagreb 7-
7-9 June 2007
Conclusion
¾ A new project has been registered on SourceForge
for the OpenFOAM community: openfoam-extend
¾ Subversion was chosen as the Version Control
system.
¾ A repository structure is proposed.
¾ “Unsupported” code can now have a home.
¾ Come and share your OpenFOAM code with the
community.
¾ Your comments will be appreciated.

Second OpenFOAM Workshop


18
Zagreb 7-
7-9 June 2007
Questions?
¾ Thank you for your attention!

Second OpenFOAM Workshop


19
Zagreb 7-
7-9 June 2007

You might also like