Getting Nuxeo EP, Nuxeo Shell and Nuxeo WebEngine sources
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.2Getting the 5.1 branch (stable)
Use the following: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
mvn eclipse:eclipse
File -> Import -> General -> Existing Projects into Workspace
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.Getting the 5.2 branch
The 5.2 branch has slightly different repositories because the code has been reorganized.hg clone http://hg.nuxeo.org/nuxeo#5.2 cd nuxeo hg clone http://hg.nuxeo.org/nuxeo/nuxeo-common#1.5 hg clone http://hg.nuxeo.org/nuxeo/nuxeo-runtime#1.5 hg clone http://hg.nuxeo.org/nuxeo/nuxeo-core#1.5 hg clone http://hg.nuxeo.org/nuxeo/nuxeo-services#5.2 hg clone http://hg.nuxeo.org/nuxeo/nuxeo-theme#5.2 hg clone http://hg.nuxeo.org/nuxeo/nuxeo-webengine#5.2 hg clone http://hg.nuxeo.org/nuxeo/nuxeo-jsf#5.2 hg clone http://hg.nuxeo.org/nuxeo/nuxeo-gwt#5.2 hg clone http://hg.nuxeo.org/nuxeo/nuxeo-features#5.2 hg clone http://hg.nuxeo.org/nuxeo/nuxeo-dm#5.2 hg clone http://hg.nuxeo.org/nuxeo/nuxeo-distribution#5.2
hg clone -r 5.2 http://hg.nuxeo.org/nuxeo
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
hg clone http://hg.nuxeo.org/nuxeo/nuxeo-platform
Updating your sources
Simply call in each repository:hg pull -u
not updating, since new heads added
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 %1 for /d %%D in (nuxeo-core nuxeo-common nuxeo-runtime 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 %1 ) cd %PWD%
@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%
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
hgx 5.1 1.4 heads hgx 5.2 1.5 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/
[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
hg fpull
hg fup
hg fup 1.5; hg fup 5.2
hg fpull -u
hgf id
Version 59.1 last modified by Sun Seng David Tan on 05/06/2009 at 18:40
Document data
Attachments:
No attachments for this document
Comments: 0