Difference between revisions of "ADempiere Version Control"

From ADempiere
Jump to: navigation, search
This Wiki is read-only for reference purposes to avoid broken links.
(adding some command tips)
(Summary Instructions)
 
(44 intermediate revisions by 7 users not shown)
Line 1: Line 1:
<font color="red"> '''Note: This is a Draft Document - work-in-progress''' </font>
+
{{Breadcrumb|Table_of_Contents#Developer.27s_Guide|next=Create your ADempiere development environment}}
 +
[[Category:Table of Contents]]
 +
[[Category:Developer documentation]]
 +
{{Note|As of Release 380, 15 January 2015, the main ADempiere repository has moved to GitHub along with the entire history of the main branches.  This document described the process of working with GitHub as well as the instructions for SourceForge. The page will be a work in progress for a few days.}}
  
==Installing Mercurial==
+
= The ADempiere Project Repository =
 +
The main repository for ADempiere can be found on the GitHub site at [https://github.com/adempiere/adempiere https://github.com/adempiere/adempiere].
  
===Install Mercurial client===
+
Before proceeding, please refer to the [http://git-scm.com/doc Git SCM Documentation].
  
* Follow the instructions at: http://mercurial.selenic.com/downloads/
+
To collaborate with the ADempiere team, we use the git '''FORK''' and '''PULL''' model. From the [https://help.github.com/articles/using-pull-requests/#fork--pull GitHub website]:
  
* Set your username in the Mercurial configuration file.
+
<blockquote>The fork & pull model lets anyone fork an existing repository and push changes to their personal fork without requiring access be granted to the source repository. The changes must then be pulled into the source repository by the project maintainer. This model reduces the amount of friction for new contributors and is popular with open source projects because it allows people to work independently without upfront coordination.</blockquote>
** For Windows edit Mercurcial.ini in your %HOMEPATH%
+
** For Linux edit the .hgrc file in your home directory ~
+
** It should contain a section as follows:
+
  
  [ui]
+
Refer to the GitHub article on [https://help.github.com/articles/using-pull-requests Pull Requests] for more information and instructions on how to get started.
  username = Tony Snook <tspc at dodo.com.au>
+
  
===Install Mercurcial Eclipse plug-in===
+
== Summary Instructions ==
 +
The setup is easy.  Follow these steps:
 +
* '''Install the Git Software.'''  You can work with the Git command line or any of a number of Git GUI tools. As the repository is on GitHub, it is recommended to follow the [https://help.github.com/articles/set-up-git/ GitHub setup procedures].
 +
* Create a GitHub account
 +
* [https://help.github.com/articles/fork-a-repo/ Create your personal fork] of the ADempiere project
 +
* Create a local clone of your personal fork
 +
* Follow the instructions in [[Create your ADempiere development environment]], [[Creating WebUI Workspace using Eclipse Webtool]] and [[Create your ADempiere customization environment]].
 +
* Start developing!
 +
* Commit your work to your own fork.  Follow the ADempiere [[Software Development Procedure]] for branch naming.
 +
* Send a pull request to the ADempiere project.
  
* You can get the plugin easily using the Eclipse Update Manager, just click Help → Software Updates in Eclipse. The Eclipse Update Site for MercurialEclipse is available at this URL:  http://cbes.javaforge.com/update
+
=== Cloning a Repository ===
  
* '''Important note:''' for users of previous HgEclipse versions: if you have HgEclipse already installed on your Eclipse, please explicitly uninstall HgEclipse before installing MercurialEclipse 1.6.0. (This is necessary due to the plugin naming changes.) It's easy: in Eclipse, click Help → About → Installation Details → select HgEclipse → click Uninstall and confirm everything. Now you can install MercurialEclipse 1.6.0.
+
Cloning a repository to your local computer is simple.  Follow the instructions with the GitHub software or your GUI tool, many of which allow for cloning a GitHub repository to a local computer with a few mouse clicks. If you want to do it from the command line,
  
* Information about the plug-in can be found at: http://www.javaforge.com/project/HGE
+
# Navigate to the parent directory where the repository will be placed and type the following command
 +
C:\dev\repos\github>git clone [url]
  
==Cloning SourceForge repositories==
+
This will create a directory using the url project name, initialize a .git directory inside it, pull down all the data for that repository, and check out a working copy of the latest version. If you go into the new directory, you’ll see the project files in there, ready to be worked on or used.
  
===Available Mercurial repositories===
+
To change the name of clone directory use the following
  
* There are currently 4 mercurial repositories: adempiere, contributions, eevolution and localizations.
+
# Navigate to the parent directory where the repository will be placed and type the following command
** The repositories can be browsed from:
+
C:\dev\repos\github>git clone [url] <optional name>
http://adempiere.hg.sourceforge.net/hgweb/adempiere
+
  
* A list of mappings from SVN folders to Mercurial repositories and branches can be found at:
+
=== Cloning the Repository with a Slow Connection ===
http://spreadsheets.google.com/ccc?key=0AsDcKifVZoKvdGFRVHo0bE1NVFBfRWZjLU55bkFGVFE&hl=en
+
  
===Cloning remote SourceForge repositories===
+
To clone a repository over a slow or intermittent Internet connection, try using git fetch instead of clone as follows:
  
* First create a directory for your cloned SourceForge repositories:
+
# Create a directory for the repo and change to it
** For example:   /opt/repos/sourceforge
+
C:\dev\repos\github>mkdir adempiere
 +
 +
C:\dev\repos\github>cd adempiere
 +
 +
# Initialize the repository
 +
C:\dev\repos\github\adempiere>git init
 +
Initialized empty Git repository in C:/dev/repos/github/adempiere/.git/
 +
 +
# The default reference to the source repository in a clone is "origin".  Clone your
 +
# personal fork from your account <account>.
 +
C:\dev\repos\github\adempiere>git remote add origin https://github.com/<account>/adempiere.git
 +
 +
# Fetch the contents.
 +
C:\dev\repos\github\adempiere>git fetch
 +
 +
# Update to the current master branch - for example
 +
C:\dev\repos\github\adempiere>git reset --hard origin/master
  
* Make a clone of the main ADempiere repository.
+
[[category:developer documentation]]
cd /opt/repos/sourceforge
+
[[Category: Technical Team]] [[Category: Functional Team]]
hg clone -U <nowiki>http://adempiere.hg.sourceforge.net:8000/hgroot/adempiere/adempiere</nowiki> adempiere
+
 
+
* Clone any additional repositories you require:
+
 
+
* Contributions repository:
+
  cd /opt/repos/sourceforge
+
  hg clone -U <nowiki>http://adempiere.hg.sourceforge.net:8000/hgroot/adempiere/contributions</nowiki> contributions
+
 
+
* Just the Libero branch of the eevolution repository
+
  cd /opt/repos/sourceforge
+
  hg clone -U <nowiki>http://adempiere.hg.sourceforge.net:8000/hgroot/adempiere/eevolution#libero</nowiki> libero
+
 
+
===Keeping up to date===
+
 
+
After you downloaded the mercurial repository you can update changes from central repository using:
+
 
+
hg pull
+
hg update
+

Latest revision as of 02:03, 14 March 2016

Table_of_Contents#Developer.27s_Guide{{#if: | | [[{{{2}}}]] }}{{#if: | | [[{{{3}}}]] }}{{#if: | | [[{{{4}}}]] }}{{#if: | | [[{{{5}}}]] }} | ADempiere Version Control{{#if: Create your ADempiere development environment| | Create your ADempiere development environment }} ⇒

Note.gif Note:

As of Release 380, 15 January 2015, the main ADempiere repository has moved to GitHub along with the entire history of the main branches. This document described the process of working with GitHub as well as the instructions for SourceForge. The page will be a work in progress for a few days.

The ADempiere Project Repository

The main repository for ADempiere can be found on the GitHub site at https://github.com/adempiere/adempiere.

Before proceeding, please refer to the Git SCM Documentation.

To collaborate with the ADempiere team, we use the git FORK and PULL model. From the GitHub website:

The fork & pull model lets anyone fork an existing repository and push changes to their personal fork without requiring access be granted to the source repository. The changes must then be pulled into the source repository by the project maintainer. This model reduces the amount of friction for new contributors and is popular with open source projects because it allows people to work independently without upfront coordination.

Refer to the GitHub article on Pull Requests for more information and instructions on how to get started.

Summary Instructions

The setup is easy. Follow these steps:

Cloning a Repository

Cloning a repository to your local computer is simple. Follow the instructions with the GitHub software or your GUI tool, many of which allow for cloning a GitHub repository to a local computer with a few mouse clicks. If you want to do it from the command line,

# Navigate to the parent directory where the repository will be placed and type the following command
C:\dev\repos\github>git clone [url]

This will create a directory using the url project name, initialize a .git directory inside it, pull down all the data for that repository, and check out a working copy of the latest version. If you go into the new directory, you’ll see the project files in there, ready to be worked on or used.

To change the name of clone directory use the following

# Navigate to the parent directory where the repository will be placed and type the following command
C:\dev\repos\github>git clone [url] <optional name>

Cloning the Repository with a Slow Connection

To clone a repository over a slow or intermittent Internet connection, try using git fetch instead of clone as follows:

# Create a directory for the repo and change to it
C:\dev\repos\github>mkdir adempiere

C:\dev\repos\github>cd adempiere

# Initialize the repository
C:\dev\repos\github\adempiere>git init
Initialized empty Git repository in C:/dev/repos/github/adempiere/.git/

# The default reference to the source repository in a clone is "origin".  Clone your
# personal fork from your account <account>.
C:\dev\repos\github\adempiere>git remote add origin https://github.com/<account>/adempiere.git

# Fetch the contents.
C:\dev\repos\github\adempiere>git fetch

# Update to the current master branch - for example
C:\dev\repos\github\adempiere>git reset --hard origin/master