Developers only

This info is here for developers only. If you don't understand it, it's not for you.

  1. Fast and Furios
  2. Step by Step
    1. Setup the Repo
    2. Understanding the Repository
    3. Keeping the Repo up to date



Currently, Coherence is using a combination of Trac + SVN. We might switch to a distributed system like git one day.

This Document is meant to explain the work flow when using the git-mirror of Coherence on github.com.

Fast and Furios

You just want to start and don't care about details? Or just copy and paste one certain command then go ahead:

$ export MY_BRACH="my_feature_rocks"
$ git clone git://github.com/ligthyear/coherence-mirror.git coherence
$ cd coherence
$ git submodule init
$ git submodule update
$ git checkout -b $MY_BRANCH
 ... do your coding here with plenty of git add [file] and git commit ...
$ git format-patch -M -B origin/master    # to create a patch mail against the master branch

Now you have created a file you could easily send for review or attach to a ticket

Step by Step

Setup the Repo

(this step only needs to be done once!) The first thing you need to do is clone the repository from github

git clone git://github.com/ligthyear/coherence-mirror.git coherence

You should see something like

Initialized empty Git repository in /home/ben/dev/coherence/.git/
remote: Counting objects: 1767, done.
remote: Compressing objects: 100% (516/516), done.
remote: Total 1767 (delta 1240), reused 1759 (delta 1237)
Receiving objects: 100% (1767/1767), 623.91 KiB | 190 KiB/s, done.
Resolving deltas: 100% (1240/1240), done.
Checking out files: 100% (192/192), done.

Now do

 cd coherence

and you will see that you have your copy of the latest coherence:

$ ls
ChangeLog  Coherence.egg-info  LICENCE	MANIFEST.in  NEWS  README
bin	coherence  docs  mirabeau_client.py  misc  setup.py  tests  tw_mirabeau_test.py

(or similar)

Ver nice. As we currently have an extern in svn trunk, we have to update the git submodules as well:

$ git submodule init
Submodule 'coherence/extern/log' (git://github.com/ligthyear/flu-log-mirror.git) registered for path 'coherence/extern/log'
$ git submodule update
Initialized empty Git repository in /home/ben/dev/coherence/coherence/extern/log/.git/
remote: Counting objects: 158, done.
remote: Compressing objects: 100% (48/48), done.
remote: Total 158 (delta 108), reused 158 (delta 108)
Receiving objects: 100% (158/158), 40.47 KiB, done.
Resolving deltas: 100% (108/108), done.
Submodule path 'coherence/extern/log': checked out '764dcbbbde27adec0f4855d1851fc337c1c55e61'

Let's check if it worked:

$ ls coherence/extern/log

Should show you:

ChangeLog  README  __init__.py	log.py	termcolor.py  test_log.py

Now you can start coding...

Understanding the Repository

Just some small words about the repository you just cloned. If you don't care about this, you can direclty skip to the next chapter. Doing a git branch -a shows us the local and remote branches we have so far:

* master
  origin/HEAD
  origin/master
  origin/trunk

As you can see we have two branches on the remote called "origin" (ignore the HEAD one): trunk and master. That is a bit special for our system but it is needed to provide a nice mirror system. trunk is basically the svn-import branch. Every ten minutes all the new things in this branch are commited to svn-trunk of coherence and the latest changes in svn-trunk are pulled into this branch. This is a clean and direkt git-svn-bridge. On top of this there is the master branch. It is updated every time the trunk branch is updated and pulls the latest changes from it. For inside git this should be your reference branch. It contains some minor changes which are git-specific (as the submodules and the .gitignore file) but necessary to provide a useable working-tree. So the way that a patch is moving is:

svn -> origin/trunk -> origin/master -> YOURBRANCH

Note: No one should ever commit to origin/master directly but for the purpose of fixing git-specific problems.

Keeping the Repo up to date

FixMe: More info...