Actions

Developer Area/Source code: Difference between revisions

From Mahara Wiki

< Developer Area
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
= The short version =
= The short version =


Clone it in [https://github.com/MaharaProject/mahara Github] or [https://gitorious.org/mahara/mahara Gitorious]. If you don't have an account on either of those, you can just clone it anonymously:
You can clone it anonymously from [https://git.mahara.org/explore/projects?group=&scope=&sort=updated_desc&tag=&visibility_level= git.mahara.org]:


  git clone https://gitorious.org/mahara/mahara.git
  git clone https://git.mahara.org/mahara/mahara.git


You'll probably also want to check out the branch for whatever stable version of Mahara you're using. For instance, if you're on Mahara 1.9, you would do:
Or from any of these servers, which are kept in sync with git.mahara.org:


  git checkout 1.9_STABLE
* [https://github.com/MaharaProject/mahara Github]
* [https://gitlab.com/mahara/mahara Gitlab.com]
* [https://git.nzoss.org.nz/mahara/mahara NZOSS]
 
You'll probably also want to check out the branch for whatever stable version of Mahara you're using. For instance, if you're on Mahara 15.04, you would do:
 
  git checkout 15.04_STABLE


= The long version =
= The long version =
Line 15: Line 21:
== Git ==
== Git ==


The Mahara Project source code is managed using the [http://en.wikipedia.org/wiki/Git_%28software%29 Git] distributed version control system. By the nature of Git, anyone who has checked out a copy of the Mahara project Git repository, now has their own full copy of the repository. So if any or all of the official Git repo's listed below were to go away, the project could always be restarted from a single dev's copy of the repo.
The Mahara Project source code is managed using the [http://en.wikipedia.org/wiki/Git_%28software%29 Git] distributed version control system. In the normal Git workflow, developers "clone" the Mahara project Git repository, which means they have their own full copy of the source code including all branches and history. So if any or all of the official Git repo's listed below were to go away, the project could always be restarted from a single dev's copy of the repo.


If you haven't used Git before, well, it does have a nasty learning curve. Taking a couple of hours to go over a Git tutorial that covers the underlying concepts (preferably something that includes the phrase "directed acyclic graph") is highly recommended.
If you haven't used Git before, well, it does have a nasty learning curve. Taking a couple of hours to go over a Git tutorial that covers the underlying concepts (preferably something that includes the phrase "directed acyclic graph") is highly recommended.
Line 21: Line 27:
== Branches & Tags ==
== Branches & Tags ==


Mahara maintains one branch for each major version of Mahara. For a major verison X.Y, the corresponding branch will be X.Y_STABLE. For instance, Mahara 1.8 is in branch 1.8_STABLE, 1.7 is in 1.7_STABLE, etc.
Mahara maintains one branch for each major version of Mahara. For a major verison X.Y, the corresponding branch will be X.Y_STABLE. For instance, Mahara 15.04 is in branch 15.04_STABLE, 1.7 is in 1.7_STABLE, etc.


Minor releases are marked by tags. Release X.Y.Z will be marked with tag X.Y.Z_RELEASE.
Minor releases are marked by tags. Release X.Y.Z will be marked with tag X.Y.Z_RELEASE.
Line 35: Line 41:


At present the "live" version of the code base is in the git repository of our Gerrit code review system, https://reviews.mahara.org . The code here is usually updated by people pushing patches into Gerrit, where they are reviewed and merged by [[Developer_Area/Mahara_development_overview#Who_makes_Mahara.3F|Mahara core developers]]. Users with the right permissions can also push patches directly to this git repo, and this happens occasionally as well (for instance the version bumps that are done by the scripts that package up our releases).
At present the "live" version of the code base is in the git repository of our Gerrit code review system, https://reviews.mahara.org . The code here is usually updated by people pushing patches into Gerrit, where they are reviewed and merged by [[Developer_Area/Mahara_development_overview#Who_makes_Mahara.3F|Mahara core developers]]. Users with the right permissions can also push patches directly to this git repo, and this happens occasionally as well (for instance the version bumps that are done by the scripts that package up our releases).
If you're just interested in reading the code and don't want to push patches, you can clone via anonymous HTTP:
git clone https://reviews.mahara.org/mahara refs/changes/47/2047/3 && git checkout FETCH_HEAD


To push patches to gerrit, you'll need to set up an account in gerrit and clone via SSH, as described in [[Developer_Area/Contributing_Code]]
To push patches to gerrit, you'll need to set up an account in gerrit and clone via SSH, as described in [[Developer_Area/Contributing_Code]]


== Gitorious & Github ==
== Synced git repositories ==


The Mahara Gerrit site automatically replicates all changes into our repositories in Gitorious and Github in near realtime.
The Mahara Gerrit site automatically replicates all changes into our repositories in several locations in near realtime. If you are going to clone the Mahara repository, it's preferred that you clone it from one of these sites rather than from https://reviews.mahara.org, in order to reduce the load on our Gerrit server.


* '''Gitorious:''' https://gitorious.org/mahara/mahara
* '''git.mahara.org:''' https://git.mahara.org/mahara/mahara
** git.mahara.org is the official main git repository of the Mahara project.
* '''Github:''' https://github.com/MaharaProject/mahara
* '''Github:''' https://github.com/MaharaProject/mahara
 
* '''gitlab.com:''' https://gitlab.com/mahara/mahara
The '''Gitorious''' repo is the official main repository of the Mahara project. Prior to our adoption of the Gerrit system, code was managed directly in the Gitorious repo (and some older pages on this wiki still refer to that). However, now it functions mainly as a read-only means of republishing the source code. If you are going to clone the entire repository, it's preferred that you clone it from one of these sites rather than from http://reviews.mahara.org, in order to reduce the load on our Gerrit server.
* '''NZOSS:''' https://git.nzoss.org.nz/mahara/mahara


== Related code ==
== Related code ==


The Mahara gitorious site contains some additional repositories that contain code related to Mahara and/or used by the Mahara project. The main ones that are not defunct:
'''git.mahara.org''' contains some additional repositories that contain code related to Mahara and/or used by the Mahara project. The main ones that are not defunct:


* [https://gitorious.org/mahara/mahara-scripts mahara-scripts] contains scripts used in the Mahara release management process
* [https://git.mahara.org/scripts/mahara-scripts mahara-scripts] contains scripts used in the Mahara release management process
* [https://gitorious.org/mahara/manual manual] contains the Mahara manual
* [https://git.mahara.org/user-manual/manual manual] contains the Mahara manual


== Third-party plugins ==
== Third-party plugins ==


Mahara is quite pluggable, and there are many [[Plugins|third-party plugins]] available for Mahara. Third-party plugin authors each have their own code repositories, often on gitorious or github. There is a "mahara-contrib" repository in the mahara project on gitorious, but it's no longer in active use.
Mahara is quite pluggable, and there are many [[Plugins|third-party plugins]] available for Mahara. Third-party plugin authors each have their own code repositories, often on Github. There was formerly a "mahara-contrib" repository in the Mahara project on Gitorious, but it's no longer in active use.

Latest revision as of 17:23, 2 Haziran 2015

This page discusses where and how Mahara source code is managed.

The short version

You can clone it anonymously from git.mahara.org:

git clone https://git.mahara.org/mahara/mahara.git

Or from any of these servers, which are kept in sync with git.mahara.org:

You'll probably also want to check out the branch for whatever stable version of Mahara you're using. For instance, if you're on Mahara 15.04, you would do:

git checkout 15.04_STABLE

The long version

Git

The Mahara Project source code is managed using the Git distributed version control system. In the normal Git workflow, developers "clone" the Mahara project Git repository, which means they have their own full copy of the source code including all branches and history. So if any or all of the official Git repo's listed below were to go away, the project could always be restarted from a single dev's copy of the repo.

If you haven't used Git before, well, it does have a nasty learning curve. Taking a couple of hours to go over a Git tutorial that covers the underlying concepts (preferably something that includes the phrase "directed acyclic graph") is highly recommended.

Branches & Tags

Mahara maintains one branch for each major version of Mahara. For a major verison X.Y, the corresponding branch will be X.Y_STABLE. For instance, Mahara 15.04 is in branch 15.04_STABLE, 1.7 is in 1.7_STABLE, etc.

Minor releases are marked by tags. Release X.Y.Z will be marked with tag X.Y.Z_RELEASE.

Additionally, there is a "master" branch which contains development work on the next major release that has not been released yet.

For more information on Mahara versions and the release cycle see:

reviews.mahara.org

At present the "live" version of the code base is in the git repository of our Gerrit code review system, https://reviews.mahara.org . The code here is usually updated by people pushing patches into Gerrit, where they are reviewed and merged by Mahara core developers. Users with the right permissions can also push patches directly to this git repo, and this happens occasionally as well (for instance the version bumps that are done by the scripts that package up our releases).

To push patches to gerrit, you'll need to set up an account in gerrit and clone via SSH, as described in Developer_Area/Contributing_Code

Synced git repositories

The Mahara Gerrit site automatically replicates all changes into our repositories in several locations in near realtime. If you are going to clone the Mahara repository, it's preferred that you clone it from one of these sites rather than from https://reviews.mahara.org, in order to reduce the load on our Gerrit server.

Related code

git.mahara.org contains some additional repositories that contain code related to Mahara and/or used by the Mahara project. The main ones that are not defunct:

  • mahara-scripts contains scripts used in the Mahara release management process
  • manual contains the Mahara manual

Third-party plugins

Mahara is quite pluggable, and there are many third-party plugins available for Mahara. Third-party plugin authors each have their own code repositories, often on Github. There was formerly a "mahara-contrib" repository in the Mahara project on Gitorious, but it's no longer in active use.