GARNOME TLA (GNU Arch) Howto

GARNOME IS NOW MAINTAINED IN SVN.

Index | <-Prev | Next->

2. Project Development

(Replace the archive name and location with your own in the following example)

2.1 Setup

We need to set an ID for ourselves so that TLA knows who is making the commits. Replace the name and email address with yours.

tla my-id "Bob Kashani <bob@somewhere.com>"

2.1.1 Default signing rules

Now let's create our signing rules. If you haven't done so already, make a dir called signing and create a file in it for signature signing. (Please make sure that you have gnupg installed)

mkdir -p ~/.arch-params/signing

Create a file called ~/.arch-params/signing/=default with the gpg signing rule in it.

echo "gpg --clearsign" > ~/.arch-params/signing/=default

2.1.2 Per archive signing rules (optional)

You can optionally create signing rules on a per archive basis. This can be useful if you need to have different rules for a specific archive.

Create a file called ~/.arch-params/signing/pd@cipherfunk.org--projects with the gpg signing rule in it.

echo "gpg --clearsign" > ~/.arch-params/signing/pd@cipherfunk.org--projects

2.2 Creating an archive location

First we need to figure out what dir we want our archives to reside in. I placed mine in my web dir so that it can be accessed by others. If you don't have a web dir, don't want others to access your archive or are going to mirror to a remote location then just use ~/arch. Mirroring an archive is covered in section 3.

Once we know where we want our archive to be we can create it.

tla make-archive -ls bob@somewhere.com--projects ~/www/arch

2.3 Creating a new project

Prereq: 2.2 Creating an archive location

Let's set our new archive name as the default so we can work with it.

tla my-default-archive bob@somewhere.com--projects

We now need to setup a new archive.

tla archive-setup myproject--main--0.1

Create a dir for your project and copy your sources into it.

mkdir ~/myproject
cp -R /path/to/your/sources/* ~/myproject

We now need to initialize our source tree.

cd ~/myproject
tla init-tree myproject--main--0.1

Let's add ids for all of our source files so that TLA knows they exist.

tla add `tla inventory --names -sB`

We now need to create our initial log file.

tla make-log

The make-log command will create a file called ++log.* in our source dir. We need to edit this file and enter our initial log info.. Just make sure that there is a line separating Keywords: and the description.

Summary: Initial Import
Keywords:

This program does blah.

We can now import the sources into our archive.

tla import

2.4 Creating a branch

Prereq: 2.2 Creating an archive location

Let's set our archive name as the default so we can work with it.

tla my-default-archive bob@somewhere.com--projects

We first need to setup a new archive for our branch.

tla archive-setup garnome--bobk--0.1

It's time to tag the archive so that we know where to start our branch. And since we want the latest revision we're going to leave out the --patch-1 suffix from the archive that we're creating a branch from.

tla tag pd@cipherfunk.org--projects/garnome--unstable--0.1 garnome--bobk--0.1

Let's check to see if we have the new revision in our archive. This should print out something like base-0 tag of...

tla revisions --summary garnome--bobk--0.1

We can now grab the revision of our newly created archive.

tla get garnome--bobk--0.1 garnome--bobk--0.1

Now just cd into the dir and behold the new branch.

cd ~/garnome--bobk--0.1

2.4.1 Caching a tag revision (optional)

If you do not want to rely on the mainline archive to get the source for garnome you can cache the mainline archive in your branch.

cd ~/garnome--bobk--0.1
tla cacherev garnome--bobk--0.1--base-0

To check to see that it was cached.

tla cachedrevs garnome--bobk--0.1

2.4.2 Updating a branch from the mainline

To update/sync with the mainline tree we can simply.

cd ~/garnome--bobk--0.1
tla replay -A pd@cipherfunk.org--projects garnome--unstable--0.1

2.4.3 Merging branches

To merge our branch with the mainline.

cd ~/garnome--bobk--0.1
tla star-merge -t pd@cipherfunk.org--projects/garnome--unstable--0.1

We then need to commit our changes.

tla commit -s 'Merged with mainline'

2.5 Manipulating the sources

To make changes to existing files just cd into the dir where the sources are stored and use your favorite editor to make changes.

cd ~/garnome--bobk--0.1

If we need to add a file or dir then we can use the add command to add it to our archive.

tla add file_or_dir

If we need to move/rename a file or dir then we can use the mv command.

tla mv file_or_dir

If we need to delete a file or dir then we can use the rm command.

tla rm file_or_dir

Once we've made our changes we need to create a log file detailing our changes for the changelog.

cd ~/garnome--bobk--0.1
tla make-log

The make-log command will create a file called ++log.* in our source dir. We need to edit this file and enter our changes info. Just make sure that there is a line separating Keywords: and our messages.

Summary: Added some stuff
Keywords:

Added two files.
Made some changes to blah.

Once we're done with the log file we can commit our changes.

tla commit

Index | <-Prev | Next->

 

About GNOME · GARNOME · Developers · Planet GNOME · GNOME Support