Downloading Nuxeo Sources

Getting Nuxeo EP, Nuxeo Shell and Nuxeo WebEngine sources

Nuxeo core developers should have a look at Nuxeo's Mercurial usage.

Nuxeo EP sources shall be retrieved and worked with using Mercurial.

Have a look at part "Using the Mercurial Forest Extension" which considerably ease the use of Nuxeo sources.

Contributors to Nuxeo sources should also look at documentation about working both on 5.1 and 5.2

See workaround for client issue if you try to clone HTTPS URL through a Proxy.

Getting the 5.3 branch

Use the following:

hg clone http://hg.nuxeo.org/nuxeo#5.3
cd nuxeo
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-common#1.6
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-runtime#1.6
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-core#1.6
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-services#5.3
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-theme#5.3
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-webengine#5.3
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-jsf#5.3
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-gwt#5.3
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-features#5.3
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-dm#5.3
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-distribution#5.3

On recent version of mercurial, it seams that the #5.3 notation does not longer work. Instead do, for instance in replacement of the first command:

hg clone -r 5.3 http://hg.nuxeo.org/nuxeo

To see all available branches, run hg branches

Note that most people working on Nuxeo EP should be cloning only one of those modules, usually nuxeo-features.

Developers will have to use a https URL, and can include a user name and password in it if they don't want to type them every time they push: https://username:password@hg.nuxeo.org/... (This URL is stored in .hg/hgrc in your repository, you can change it after the initial clone.)

Optionally if you want to open/edit the projects in Eclipse do the following at the very root of the Mercurial repository:

mvn eclipse:eclipse
And then in Eclipse:
File -> Import -> General -> Existing Projects into Workspace

Getting the 5.2 branch

Use the same recipe as above, but use 5.2 instead of 5.3, and 1.5 instead of 1.6.

Getting the 5.1 branch (old)

The 5.1 branch had slightly different repositories, the code has since been reorganized.

hg clone http://hg.nuxeo.org/nuxeo#5.1
cd nuxeo
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-common#1.4
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-runtime#1.4
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-core#1.4
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-theme#5.1
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-platform#5.1
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-shell#5.1
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-distribution#5.1

Getting a specific release

If for instance you want to get the 5.1.4 release, follow the instructions above by replacing 5.1 with 5.1.4 and 1.4 with 1.4.1.

Since release 5.1.6, we tag all the sources with the same pattern release-x.y.z (using only major version from nuxeo-platform). For example, pulling revision release-5.1.6 on nuxeo-core will get 1.4.3 source code.

To see all available tags, run hg tags

Getting the full repository

Use the following:

hg clone http://hg.nuxeo.org/nuxeo
cd nuxeo
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-common
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-runtime
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-core
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-services
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-theme
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-webengine
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-jsf
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-gwt
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-features
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-dm
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-shell
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-distribution

And if you need older versions of the 5.1, 5.2 or 5.3 code:

hg clone http://hg.nuxeo.org/nuxeo/nuxeo-platform

please be sure to set correctly the branch for each repository

Updating your sources

Simply call in each repository:

hg pull -u

If, when you use this, you get a message like:

not updating, since new heads added
then you will have to call hg update manually in the appropriate repository.

Downloading the Nuxeo Apogee RCP sources

Use the following:

hg clone http://hg.nuxeo.org/nuxeo-apogee#2.0

Useful shell functions

These two shell functions ease working on Nuxeo Mercurial repositories. Add them to your .profile or .bashrc:

# Mercurial function that recurses all sub-directories containing a .hg directory and runs on them hg with given parameters
hgf() {
  for dir in . nuxeo-*; do
    if [ -d "$dir"/.hg ]; then
      echo "[$dir]"
      (cd "$dir" && hg "$@")
    fi
  done
}

# Mercurial function that recurse nuxeo sub-directories (nuxeo-common, nuxeo-core, etc.) and runs on them hg commands with given parameters.
# The two first parameters are mandatory and used to specify version; only one is used on each directory; 
# syntax is Reverse Polish Notation; 
# example: "hgx 5.1 1.4 heads" <=> "cd nuxeo-common; hg heads 1.4; (...); cd nuxeo-platform; hg heads 5.1; (...)"
hgx() {
  NXP=$1
  NXC=$2
  shift 2;
  if [ -d .hg ]; then
    echo $PWD
    hg $@ $NXP
    # NXC
    (echo nuxeo-common ; cd nuxeo-common; hg $@ $NXC || true)
    (echo nuxeo-runtime ; cd nuxeo-runtime; hg $@ $NXC || true)
    (echo nuxeo-core ; cd nuxeo-core; hg $@ $NXC || true)
    # NXP
    (echo nuxeo-theme ; cd nuxeo-theme; hg $@ $NXP || true)
    [ -d nuxeo-shell ] && (echo nuxeo-shell ; cd nuxeo-shell; hg $@ $NXP || true) || (echo ignore nuxeo-shell)
    [ -d nuxeo-platform ] && (echo nuxeo-platform ; cd nuxeo-platform && hg $@ $NXP || true) || (echo ignore nuxeo-platform)
    [ -d nuxeo-services ] && (echo nuxeo-services ; cd nuxeo-services && hg $@ $NXP || true) || (echo ignore nuxeo-services)
    [ -d nuxeo-jsf ] && (echo nuxeo-jsf ; cd nuxeo-jsf && hg $@ $NXP || true) || (echo ignore nuxeo-jsf)
    [ -d nuxeo-features ] && (echo nuxeo-features ; cd nuxeo-features && hg $@ $NXP || true) || (echo ignore nuxeo-features)
    [ -d nuxeo-dm ] && (echo nuxeo-dm ; cd nuxeo-dm && hg $@ $NXP || true) || (echo ignore nuxeo-dm)
    [ -d nuxeo-webengine ] && (echo nuxeo-webengine ; cd nuxeo-webengine; hg $@ $NXP || true) || (echo ignore nuxeo-webengine)
    [ -d nuxeo-gwt ] && (echo nuxeo-gwt ; cd nuxeo-gwt; hg $@ $NXP || true) || (echo ignore nuxeo-gwt)
    (echo nuxeo-distribution ; cd nuxeo-distribution; hg $@ $NXP || true)
  fi
}

Useful batch scripts for windows

The following code has to be placed in two files hgf.bat and hgx.bat, and created files should be placed in a folder present in %Path% to be directly accessible

hgf.bat

@echo off

set PWD=%CD%
echo [.]
hg %*

for /d %%D in (nuxeo-*) do (
echo [%%D]
cd %PWD%\%%D
hg %*
)

cd %PWD%

hgx.bat

@echo off

set PWD=%CD%
set NXP=%1
set NXC=%2

echo [.]
hg %3 %NXP%

for /d %%D in (nuxeo-platform nuxeo-distribution nuxeo-theme nuxeo-shell nuxeo-webengine nuxeo-gwt nuxeo-services nuxeo-jsf nuxeo-features nuxeo-dm) do (
echo [%%D]
cd %PWD%\%%D
hg %3 %NXP%
)

for /d %%D in (nuxeo-core nuxeo-common nuxeo-runtime) do (
echo [%%D]
cd %PWD%\%%D
hg %3 %NXC%
)

cd %PWD%

Example usage (some of these may be done using Forest):

hgf branches
hgf id
# switch working directory on 5.1
hgx 5.1 1.4 up -C
# create a branch for working on task NXP-XYZ-...
hgf branch NXP-XYZ-fix-applied-on-all-nuxeo
# do some work ...
# view changed files and then commit them
hgf st
hgf ci -m"NXP-XYZ ..."
# merge work on 5.1
hgx 5.1 1.4 up -C
hgf merge NXP-XYZ-fix-applied-on-all-nuxeo
hgf ci -m"merge NXP-XYZ on 5.1/1.4"
# merge 5.1 on 5.2
hgx 5.2 1.5 up -C
hgx 5.1 1.4 merge
hgf ci -m"merge 5.1/1.4 with NXP-XYZ on 5.2/1.5"
# see all outgoing changesets and push them
hgf out
hgf push
# or, to specifically push only modified branches
hgx 5.2 1.5 push -r
hgx 5.1 1.4 push -r
hgf push -r NXP-XYZ-fix-applied-on-all-nuxeo

PS: always be careful when pushing that there's no multiple heads (someone could have pushed changes just before your push tentative and next your last pull/update)

hgx 5.1 1.4 heads
hgx 5.2 1.5 heads
hgx 5.3 1.6 heads

Using the Mercurial Forest Extension

Using the Mercurial Forest Extension helps when dealing with sub-projects. Here at Nuxeo we prefer to use the hgf and hgx shell functions that do almost the same thing as Forest in an even faster fashion. So this section about Forest is mainly kept for reference.

Installing the Mercurial Forest Extension

First you need to retrieve (download) the Mercurial Forest Extension. This will retrieve through mercurial the code you need in a ~/version/hg.akoha.org directory in your home directory. You can of course replace ~/version/hg.akoha.org by whatever you want.

mkdir -p ~/version/hg.akoha.org
cd hg.akoha.org
hg clone http://hg.akoha.org/hgforest/

Then you need to configure mercurial to use this extension. To do so, add the following lines in your ~/.hgrc :

[extensions]
hgext.forest=~/version/hg.akoha.org/hgforest/forest.py

Using Forest

To retrieve all the source code in one go:

hg fclone http://hg.nuxeo.org/nuxeo

But note that if you do that for Nuxeo 5.2 or 5.3, you will fetch nuxeo-platform, which is big and not used anymore since 5.2. This is one reason why we recommend not using forest.

To update the sources to the latest version, first fetch all changes in your local repository:

hg fpull

Then update your branch:

hg fup

For your first update after a fclone, the correct branch will not have been selected, you should switch explicitely to 1.6 (for nuxeo-common, nuxeo-runtime and nuxeo-core) and 5.3 (for the rest):

hg fup 1.6; hg fup 5.3
You can ignore warnings about unknown branches for the repositories that have the other one.

BEWARE:

hg fpull -u
has strange behavior and may not always update, prefer the two separate "fpull" then "fup" above.

Always check your current working version with:

hgf id
Note especially the branch shown in parentheses.

Nuxeo versioning policy

Summary sample

SCM BranchSCM TagVersionStatus
5.3 5.3.x-SNAPSHOTdevelopment branch where are prepared next 5.3.x versions
5.2 5.2.x-SNAPSHOTdevelopment branch where are prepared next 5.2.x versions
5.1 5.1.x-SNAPSHOTold development branch where was prepared next 5.1.x version, now is maintenance branch for releases 5.1.x
5.3.0release-5.3.05.2.0release branch and tag for 5.3.0 version
5.2.0release-5.2.05.2.0release branch and tag for 5.2.0 version
5.2.0 5.2.0.(x+1)-SNAPSHOTmaintenance branch for releases 5.2.0.x and where can be prepared some minor releases 5.2.0.(x+1), or specific bug fixes on some 5.2.0 modules
5.2-NXP-9999 5.2.x-SNAPSHOTdevelopment branch dedicated to NXP-9999 task or bug fix

Main development branches are 5.1, 5.2, 5.3, ...

Maintenance branches (5.1.6, 5.2.0, 5.2.1, ...) are created while releasing for future bug fixes.

Releases are built from tags set on their maintenance branch.

Bug fixes are done on maintenance branches and forwarded to development branches. Important fixes may also be backported from development branches to specific maintenance branches, in order to perform minor releases (5.2.0.1, 5.2.0.2, ...).

Detailed sample

Development is done on branch 5.2 with actual version 5.2.5-SNAPSHOT.

Let's say we will release code from 5.2 branch. A branch is created from 5.2, named 5.2.5. On branch 5.2.5, version is updated from 5.2.5-SNAPSHOT to 5.2.5 (releasing version). On branch 5.2.5, code is tagged as release-5.2.5. On branch 5.2.5, version is updated to 5.2.5.1-SNAPSHOT (in case of future minor fixes for 5.2.5 version). On branch 5.2, version is updated to 5.2.6-SNAPSHOT (next release version). Release done.

Next development is still done on branch 5.2, with version 5.2.6-SNAPSHOT.

Bugs identified on 5.2.5 version will be fixed on maintenance branch 5.2.5 and forward ported to 5.2 branch. If we estimate some bug fixes are required on 5.2.5.x released version, we may backport them from 5.2 branch to 5.2.5 branch and then release a 5.2.5.(x+1) corrective version.

Version 68.4 last modified by Florent Guillaume on 18/01/2010 at 10:12

Comments 0

No comments for this document

Attachments 0

No attachments for this document

Creator: Florent Guillaume on 2008/03/23 16:07
© 2008-2010 Nuxeo
1.3.8295