Talia Core is now in a separate repository

The "core" classes of Talia had been part of the main talia repository in GitHub. The idea was to make checkins easier and avoid some of git's quirks when working with subdirectories. There's also an article on the quirks of git submodules.

However, when we have multiple projects it would mean that the core would spread through all of them, becoming very hard to maintain. Thus the core has been move into it's own repository again: http://github.com/net7/talia_core and will be checked out as a subdirectory.

A few rake tasks and such exist to avoid the quirks of working with the code.

Initializing the repository

If you have a fresh checkout, just follow the instructions in SetupWorkEnvironment. If you are a developer, it is important to use the rake task to get the submodules:

rake talia_dev:setup_environment git_writeable=yes

The git_writeable=yes option makes sure that you can actually push to the submodule directories. If you would do a normal init instead, git would use the non-writeable versions and you would have to fix that by hand.

Updating an existing checked-out version

  • First off, make sure you have no modifications in talia_core. If you have, it is best to move them aside before switching, and then restore the changes after that.
  • After you have pulled the new version, first check if the vendor/plugins/talia_core directory is still there. If it is delete it (you backed up any changes, right?)
  • Then update the submodules with the rake task. This will not make any existing submodules writeable, but it will fetch the "pushable" version of talia_core

Working with the talia_core submodule

The main quirks with the submodule is that it will not automatically commit changes (or push) when you commit or push in the "parent" directory. It will also not update automatically when you fetch the "parent".

Getting the newest changes in talia_core

If you don't make modifications to talia_core, you can keep it up-to-date by using git submodule update. If you're working on the current development branch, you should probably always fetch like this:

git fetch
git submodule update

Making modifications in Talia Core

If you make modifications to 'talia_core' you can simply go to the directory and use it like any other git repository:

cd vendor/plugins/talia_core
git {status|pull|push|whatever...}

Take note that the submodule may not be on tip of the branch but on another revision. If this is the first time that you modify the submodule, do a git checkout <branch> first, but note that. Otherwise you can commit and push like usual. Important: Do not manipulate (update/checkout/...) the repository unless you want the other users to see it, too.

After you pushed the modifications to the core, you may also want to push your modifications to the parent.

Updating the submodule on the parent

When you have made modifications to one submodule (for example to vendor/plugins/talia_core), you can commit to the parent directory:

cd vendor/plugins/talia_core
hack
hack
git commit
git push
cd ../../..
git commit
git push

When you commit to the parent directory, you will update the revision that the submodule "points" to. This means, that all other users will have the same revision of the submodule as you after they do their git submodule update