Menu

doc-DevGuide

Shun Sakuraba Nobuyuki MATUBAYASI

Repository access

ERMOD uses Git (https://git-scm.com) as the version controlling system.
With Mercurial installed, user can check out the source code repository via http://sourceforge.net/p/ermod/code/ page through

git clone git://git.code.sf.net/p/ermod/git ermod
cd ermod
git checkout ver10

If you want to commit, use

For further instructions, please refer to the how-to manuals of Git.
Currently, one branches is actively used, namely "ver10", which correspond to version 1.0.x.

If you are in "developers" group, you can instead access with

git clone ssh://(yoursourceforgeusername)@git.code.sf.net/p/ermod/git ermod

In this way, you can commit the changes to the repository.
It is also possible to register your ssh public key to sourceforge; go to account service and read the instructions there.
Before submitting the code, especially when committing changes to the stable branch, please make sure your code be reviewed by another developer.

When you modify a program and submit the modified program into the repository,

git diff
git add foo.F90 bar.F90 
git commit
git push origin ver10

In the git commit command, you will be asked to type comments about the modification.
Further, it may be necessary to set up the user name in ~/.gitconfig by typing

[user]
        email = shun.sakuraba@gmail.com
        name = Shun Sakuraba

within the ~/.gitconfig file

In the future, if we actively develop, say ver20, we need to copy some of the changes we found in ver10 (e.g. found a bug existing both branches). In such , the following scheme needs be conducted.

git checkout ver20
git branch         # should show active branch, "ver20"
git log ver10      # show changes to ver10 and decide whether you should incorporate
git merge ver10    # merge the program modifications in ver10 into ver20.
git status

If merge fails (there are conflicting changes in ver10 and ver20), you have to manually resolve the merge, git add conflicting files, and perform git commit.
(If you don't have time you can just do git merge --abort to get back to the state before merging

vi engproc.F90  # Open the program and resolve the conflict
git add  engproc.F90
git commit -m "merged the changes from version 10”
git push origin ver10

A program with conflict needs be modified through direct editing.
See [[https://www.atlassian.com/git/tutorials/using-branches/merge-conflicts]] for more information.

Setting up autotools

Checked out repository does not have necessary shell scripts to build the program,
such as configure, install and such. If your system has autotools >= 2.69,
the following command will install the necessary files.

autoreconf -I m4 -i -s

Related

Wiki: Home

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.