Marble/GsocGit

From KDE TechBase
Revision as of 19:47, 4 June 2010 by Earthwings (talk | contribs) (Created page with 'This tutorial is a quick introduction to the setup and work with git and gitorious.org in Marble's Google Summer of Code (GSOC) projects. Further details can be found in the link...')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This tutorial is a quick introduction to the setup and work with git and gitorious.org in Marble's Google Summer of Code (GSOC) projects. Further details can be found in the links listed in the last section of the page.

Overview

The Marble source code is stored in the official KDE Subversion repository. The directory trunk/KDE/kdeedu/marble/ keeps the latest development changes. This is the reference code you should work with during GSOC. For your convenience this repository part is mirrored at gitorious.org in the svn.kde.org branch of the marble repository in the marble project. This branch is updated from time to time to keep in sync with the development in Subversion.

For your GSOC project, you setup another git repository on gitorious.org: Your personal clone of the marble gitorious repository. You will be the only person writing to the repository. Additionally you can synchronize it with (import) the latest Subversion changes at your convenience. There's a fourth repository, your local clone of your personal gitorious clone. Local means that unlike the other repositories, this one is only stored on your system. This is the repository you work with most of the time. The others are only for synchronization.

Summing it up, there are four physical repositories:

  • svn.kde.org keeps the latest Marble development code
  • marble/marble.git on gitorious.org is a mirror of the svn.kde.org repository
  • ~yournick/marble/yournicks-marble.git keeps your GSOC changes visible to the public
  • A local clone on your system keeps your current development and is synchronized with your personal gitorious clone

Logically, there are only two repositories:

  • The latest Marble code in the marble/marble repository
  • Your personal clone of the marble/marble repository which also holds your GSOC project (changed and added files)

To understand how these repositories are updated / synchronized, let's have a look at who does which changes. First, changes from the top:

  • Marble developers commit changes to the svn.kde.org repository
  • Earthwings (or another Marble developer) from time to time invokes a script that transports the latest changes to svn.kde.org to the marble/marble.git repository on gitorious.org
  • You (and nobodoy else) can import these changes into your personal clone
  • You (and nobody else) can import changes to your personal clone on gitorious.org to your local clone. This is only needed if you are working on more than one system.

Changes from bottom to top happen like this:

  • You (and nobody else) can push your local development changes to your personal clone on gitorious.org
  • Your personal clone is not going to be merged in the marble/marble.git repository (see below)
  • The marble/marble.git repository is not going to update svn.kde.org

Now how does your GSOC project end in the official Subversion repository? This will be handled at the end of GSOC via reviewboard. Git can create the necessary patch easily.

While the number of repositories involved may seem huge and the process very complex, it is easy and fast to work with in practice. The main advantage of git in the GSOC context is its ability to handle merges easily. Merges occur when you synchronize your personal clone with the Marble development sources and when your GSOC project is merged ino the Marble development sources at the end of GSOC.

Gitorious Setup

To be continued.