Next: Using GIT, Previous: Technical HOWTOs, Up: Hacker's guide [Contents][Index]
Since March, 4th 2010, Liquid War 6 uses GIT to handle source code, track changes, branches, and the rest. It replaces the GNU Arch repository. This old repository contains all sources up to version 0.0.7beta, following versions, including 0.0.8beta, must be retrieved from GIT.
So the following informations only concern those who are interested in previous versions of the game. Anybody else - probably you - should use GIT instead.
See Using GIT.
Still, this quick Arch survival guide is kept in the documentation.
Read the GNU Arch tutorial to learn how Arch works. Note that there are many other source control managers available, some of which provide functionnalities similar to GNU Arch / tla. GNU Arch has been chosen for Liquid War 6 because:
The repository for Liquid War 6 is accessible on http://arch.savannah.gnu.org/archives/liquidwar6. This is a read-only access, but with the distributed nature of GNU Arch, it still allows you to keep track of your own changes, and submit patches. Accessing it in read/write mode with sftp requires a Savannah account and special rights on the Liquid War 6 project.
Here are typicall commands one can use to get Liquid War 6 source from the GNU Arch repository:
tla register-archive http://arch.savannah.gnu.org/archives/liquidwar6 tla get -A liquidwar6@sv.gnu.org liquidwar6--beta
All the patches in the archive are signed with GnuPG, so you can check their authenticity with my public key.
You might need to edit your $HOME/.arch-params/signing/=default.check
file and put the following text in it:
tla-gpg-check gpg_command="gpg --verify-files -"
This section is for those who want to hack the game and set up their own repositories. This will enable you to keep track of your patches, package them, and help the core maintainer merging them in the main repository.
You can introduce yourself and create a repository by issuing commands like:
You can introduce yourself and create a repository by issuing commands like:
tla my-id me@home.net tla register-archive me@home.net--2008 /home/me/tla-archives
Then, you can get create your own repository, with a command like:
tla tag -S liquidwar6@sv.gnu.org/liquidwar6--beta--0.1 me@home.net--2008/liquidwar6--beta--0.4
The idea is that you create, locally, a depot which has a name that matches the name on savannah (this is for convenience, you could technically give it any name...) and indicate that they represent, today, the same thing.
You can get a working copy of your depot with the command:
tla get me@home.net--2008/liquidwar6--beta--0.4
This will create a complete source tree, which you are free to modify, this is where you should hack.
To synchronize yourself with upstream developments, go into
your copy (the directory created by tla get
) and type:
tla star-merge liquidwar6@sv.gnu.org/liquidwar6--beta--0.1
This will apply locally all the changes that happened since the
last synchronization. Of course this is one way to work, you
can decide to cherry pick patches and such stuff, but for most
dayly uses, a good’ol star-merge
is fine.
Not that star-merge
will only apply patches on your
working copy, not on your repository. The only way to actually
commit the modifications on the repository is to use the
commit
command.
When using Arch, you can of course still send patches created
with diff
, or even send updated files directly, the way
you would without revision control.
But it can be more convenient to either
/home/me/tla-archives
in our example).
tla mkpatch
.
Here’s an example of an mkpatch
command, and which will
compute the differences between a previous
liquidwar6--beta--0.4--patch-2
snapshot and a not yet
commited latest version:
tla mkpatch {arch}/++pristine-trees/unlocked/liquidwar6/liquidwar6--beta/liquidwar6--beta--0.4/me@home.net--2006/liquidwar6--beta--0.4--patch-2 . my-patch
This will create a my-patch
directory, which can be gzipped
and sent by mail.
Sometimes, when signing a patch, you might enter the wrong passphrase several times, or you might press CTRL+D inadvertantly. In that case, tla will be in a half-broken state, telling you it can’t acquire revision lock... A quick workarround for this is to go to the depot, find the latest patch, and in this repository, create the following folders:
++revision-lock/+contents
Both are directories, note the two ++ and the single +. the +contents
directory can be empty. Once you’ve done this, try to re-commit.
Next: Using GIT, Previous: Technical HOWTOs, Up: Hacker's guide [Contents][Index]