My Way to play with master and 5.x branches

Note : here is presented a generic way to set up a git repository in order to be able to push into Scilab sources. Therefore, you must adapt master/5.x to the relevant version you're working on.

Get the repositories

[SHELL] mkdir ~/repositories
[SHELL] cd ~/repositories

# master branch
# =======================================================
[SHELL] git clone ssh://firstname.lastname@git.scilab.org:29418/scilab master


# 5.x branch
# =======================================================
[SHELL] git clone ssh://firstname.lastname@git.scilab.org:29418/scilab 5.x
[SHELL] cd 5.x
  # Create a local 5.x branch
[SHELL] git branch 5.x refs/remotes/origin/5.x
  # CheckOut this branch
[SHELL] git checkout 5.x
  # We don't need the master branch in this repository anymore :
[SHELL] git branch -D master

Configure, Compilation, etc ...

Note : according to the branch you're developing on, those prerequirements can change. Particularly, there used to be a libs folder, which doesn't exist anymore, and a java folder appeared. Folder indicated in this page are for the master version and for the last branch of the Scilab 5 family.

Note bis: after the 5.4.1 version, the repositories for unix systems have been change to 'linux' (instead of Linux, for 32 bits) and macosx (instead of MacOSX). Windows, Windows_x64 and linux_x64 haven't changed.

Most of the Scilab dependencies are packaged in the major Linux distributions (and Mac OS X packaging system). See: Dependencies of Scilab 5.X

# master branch
# =======================================================
cd ~/repositories/master/scilab
# 32 bit - don't forget to change Linux to linux if your version is later than 5.4.1
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/Linux/thirdparty thirdparty
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/Linux/java java
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/Linux/modules modules
# bin is not required anymore after 5.4.1 version
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux/bin bin
# libs has been changed to lib after 5.4.1 version
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux/libs libs
# since 5.4.1 version, this command is also mandatory
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux/include include
./configure
make all

# 64 bit
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux_x64/thirdparty thirdparty
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux_x64/java java
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux_x64/modules modules
# bin is not required anymore after 5.4.1 version
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux_x64/bin bin
# libs has been changed to lib after 5.4.1 version
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux_x64/libs libs
# since 5.4.1 version, this command is also mandatory
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/linux_x64/include include

# master branch under Mac OS X
# =======================================================
cd ~/repositories/master/scilab
# Use macosx instead of MacOSX for version newer than 5.4.1
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/macosx/thirdparty thirdparty
# bin is not required anymore after 5.4.1 version
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/macosx/bin bin
# Since the 5.4.1 version, these commands are mandatory
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/macosx/include include
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/trunk/Dev-Tools/SE/Prerequirements/macosx/lib lib
./configure
make all

# 5.x branch - See information above about the changes that occured in the tree
# ==============================================================================
cd ~/repositories/5.x/scilab
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/branches/5.x/Dev-Tools/SE/Prerequirements/linux/bin bin
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/branches/5.x/Dev-Tools/SE/Prerequirements/linux/thirdparty thirdparty
svn checkout --username anonymous --password Scilab svn://svn.scilab.org/scilab/branches/5.x/Dev-Tools/SE/Prerequirements/linux/java java
./configure
make all

Fix a bug in the 5.x branch and merge the 5.x branch into the master branch

[SHELL] cd ~/repositories/5.x

  # Just check the branch
[SHELL] git branch
.* 5.x

  # Edit The guilty file
[SHELL] nano scilab/modules/compatibility_functions/help/fr_FR/mtlb_sort.xml

  # Add the file to list of item to commit
[SHELL] git add scilab/modules/compatibility_functions/help/fr_FR/mtlb_sort.xml 

  # Commit it
[SHELL] git commit -m 'Fix accented characters'
.Created commit 065bdd6: Fix accented characters
. 1 files changed, 1 insertions(+), 1 deletions(-)

  # Send the commit to the server
[SHELL] git push
.Counting objects: 15, done.
.Compressing objects: 100% (8/8), done.
.Writing objects: 100% (8/8), 643 bytes, done.
.Total 8 (delta 6), reused 0 (delta 0)
.-Info-         Update is fast-forward
.-Info-         The user is: 'pierre.marechal@scilab.org'
.-Grant-                Granting access based on authz
.To git@git.scilab.org:scilab
.   38e8d08..065bdd6  5.x -> 5.x

  # Now merge the 5.x branch with master branch
[SHELL] cd ~/repositories/master

  # Update your "master" repository
[SHELL]  git pull
.remote: Counting objects: 15, done.
.remote: Compressing objects: 100% (8/8), done.
.remote: Total 8 (delta 6), reused 0 (delta 0)
.Unpacking objects: 100% (8/8), done.
.From git@git.scilab.org:scilab
.   38e8d08..065bdd6  5.x        -> origin/5.x
.Already up-to-date.

  # And now, The Merge
[SHELL] git merge refs/remotes/origin/5.x
.Merge made by recursive.
. .../help/fr_FR/mtlb_sort.xml                       |    2 +-
. 1 files changed, 1 insertions(+), 1 deletions(-)

  # Check the commits
[SHELL] git log -n 2
.commit c8c1e14ece3b2dfec4f6c3412dbbdccf9a37f574
.Merge: f7210ff... 065bdd6...
.Author: Pierre MARECHAL <pierre.marechal@scilab.org>
.Date:   Wed Dec 3 10:51:53 2008 +0100
.
.    Merge commit 'refs/remotes/origin/5.x'
.
.commit 065bdd66900f4091e9b3479e524ddc529c4281f8
.Author: Pierre MARECHAL <pierre.marechal@scilab.org>
.Date:   Wed Dec 3 10:43:19 2008 +0100
.
.    Fix accented characters


  # Send the commit to the server
[SHELL] git push 
.Counting objects: 13, done.
.Compressing objects: 100% (5/5), done.
.Writing objects: 100% (5/5), 500 bytes, done.
.Total 5 (delta 4), reused 0 (delta 0)
.-Info-         Update is fast-forward
.-Info-         The user is: 'pierre.marechal@scilab.org'
.-Grant-                Granting access based on authz
.To git@git.scilab.org:scilab
.   f7210ff..c8c1e14  master -> master
.

public: My Way to play with master and 5.x branches (last edited 2014-06-06 14:32:19 by vincent.couvert@scilab-enterprises.com)