代码下载

来自iDempiere zh
跳转至:导航搜索

克隆iempiere代码仓

iempiere的代码托管在Atlassian Bitbucket上,可以直接用命令行下载完整的仓:

cd $HOME/sources
请根据你本地的文件夹构成替换$HOME/sources
克隆代码仓
hg clone https://bitbucket.org/idempiere/idempiere
切换分支到release-6.1
hg update release-6.1

经过官方对iempiere代码仓瘦身后,目前的代码仓大概300MB不到。

提示: 代码仓压缩包的下载

由于网络的不稳定,经常会导致hg clone的失败,在这种情况下可以通过直接下载版本6.1发布时点的代码仓来解决该问题 下载地址

下载并解压缩之后,在解压缩的位置执行下述命令即可:

hg -v pull -u

经过几次尝试,没有出现无法下载的情况,后续的内容将不再翻译。

Tip: Incremental clone

Alternatively, an incrementalClone.sh script can be used to download on slow lines, you just need to download the script and execute on the folder you want to download:

incrementalClone.sh https://bitbucket.org/idempiere/idempiere

Or, you can do it manually, note that mercurial doesn't support directly to do incremental clone, so the trick is to clone the first revision and then incrementally pull sets of revisions, for example:

hg clone -r 1 https://bitbucket.org/idempiere/idempiere
cd idempiere
hg pull -r 100 -u
hg pull -r 200 -u
hg pull -r 300 -u
hg pull -r 400 -u
hg pull -r 500 -u
... and so on until the actual revision of the repository

Local experimentation clone

Once you have downloaded the sources from bitbucket you can easily clone locally your downloaded repository (for example for experimentation purposes) with an instruction like this:

cd $HOME/sources
hg clone idempiere myexperiment

This way you could experiment with a local clone instead of the downloaded from bitbucket (in order to keep it pristine).

Set the working version

If you are going to work with iDempiere development version (actually > 5.1) please execute:

cd $HOME/sources/myexperiment
hg update default

If you are going to work with iDempiere version 5.1:

cd $HOME/sources/myexperiment
hg update release-5.1

Keeping up to date

When you want to synchronize your local clone with bitbucket again you can do it with:

cd $HOME/sources/idempiere
hg pull -u

and/or, similarly for your local clone

cd $HOME/sources/myexperiment
hg pull -u

Note that first one will pull from bitbucket, and second will pull from your local clone.

This tutorial is brought to you by Carlos Ruiz from GlobalQSS. Feel free to improve directly or suggest using the Discussion tab.

Cookie帮助我们提供我们的服务。通过使用我们的服务,您同意我们使用cookie。