Version 4 (modified by nicolasmartin, 23 months ago) (diff)

Good Practices

Set up a proper development environment once and for all

Obviously each developer can have its own working approach for developing the NEMO code, however we recommend to download and run this script to install a clean and minimal working copy with everything you need to start your development and to support the NEMO reference.
Actually it will download from the SVN repository a working copy of the NEMO root directory but only in terms of the very first paths in depth, you will have NEMO/branches and NEMO/releases with empty subfolders. Only the trunk (NEMO/trunk) and the last NEMO release (NEMO/releases/release-X.X) will be entirely downloaded.

The benefits of this new way are numerous:

  • Possibility to work offline like git: create a dev branch by copying the trunk and start coding without a first commit to the repository
  • Simple SVN commands (UNIX-like) without tedious svn+ssh URL scheme: create your dev branch locally and commit it as you want to the repository instead of creating the dev branch remotely on the repository and then downloading it to start working.
  • Put an end at the branches scattering, no more multiple working copies but now all needed developments handled in one location

Manage SVN external references according to your needs

As of now, the working copy of the NEMO code is build from several sources in the repository, via SVN external definitions.
The "core" code which is actively developed in line with NEMO releases is still present and unique to a selected branch. Whereas the "complementary" code modified from time to time between consecutive releases has been extracted from the development organisation to be shared between branches from one location.

Here is the current list of these externals definitions for the NEMO code

Wiki page "Developers/ExternalDefinitions" does not exist

From that you have 2 options per external, either

  • you want to be isolated by default from unwanted commits coming from outside, fix a revision for the definition (add @ with revision number at the end of relative path) and you will be in safe mode.
  • you want to be able to commit on this external from your dev branch, don't modify the definition but you will receive the commits at each SVN update.

Of course you can change your mind any time and update the externals of your branch on a case-by-case basis. But don't forget to push your modified externals to the repository.

⇒ configuration of NEMO releases ⇒ current configuration of the trunk

Be smart while working with ticket

Be careful if you combine the 2 cases

  • If the commit is related to ticket(s), we highly suggest to add the commit message as a comment in related ticket(s). To do so, you can use a word from this list addresses re references refs see followed by usual ticket links).
    Ex: write see #1948 somewhere in the commit message to link with #1948
  • If the commit is a fix for ticket(s), you can close them with the commit. To do so, you can use one of the word in the list close closed closes fix fixed fixes followed by usual ticket link(s).
    Ex: write fix #1948 somewhere in the commit message to close #1948 without a browser.

Usual commands for major steps of a development branch

## Create your development branch locally
##+ Here it is assumed that you have set up the recommended development environment 
$ svn copy trunk[@${REV}] branches/$year/dev_r${REV}_${NameOfNewBranch}
##+ If not, create the dev branch directly in the repository then download it
## $ svn copy     svn+ssh://${ID}                \
##                svn+ssh://${ID}$year/dev_r${REV}_${NameOfNewBranch}
## $ svn checkout svn+ssh://${ID}$year/dev_r${REV}_${NameOfNewBranch}

## If needed, edit the external references for your branch (${SVN_EDITOR} env. variable must be set)
$ svn propedit svn:externals ${PATH_BRANCH}


## At your convenience, push your changes to the repository (externals are versioned SVN properties)
$ svn commit [-m 'log message'] ${PATH_BRANCH}


## Download sette tool to validate your changes to the NEMO reference
$ svn checkout ${PATH_BRANCH}

## Get documentation figures for building NEMO manual (not mandatory)
$ svn checkout  ${PATH_BRANCH}/doc/figures