Projects - Getting Started With Arch
This page attempts to make the process of getting a project started with Arch a bit less painful. It is slanted for helping those who want to help contribute to Emacs Muse, but hopefully it may be found helpful for other uses.
[ Top: Arch Tutorial ]
[ This is Part 1: Getting Started With Arch ]
[ Next is Part 2: Developing With Arch ]
Please see the instructions on Arch Wiki: Getting Arch and Arch Wiki: Installing Arch.
When you commit changes to an archive, Arch will need to know who you are. It puts this information at the beginning of the change log for each entry you commit.
tla my-id 'Jane Doe <email@address.org>'
Before you can work on your own stuff with Arch, you will need to create an archive. An archive is the place where all of your different projects are installed. You might want to make separate archives for your private and public projects. You might also want to put the current year in the name of the archive so that you can have a fresh start every year.
mwolson@gnu.org--2005.tla to set up this archive.tla make-archive <name> <location>
tla archives
tla commands require you to specify the
current archive with the -A switch. If you the do the following
command, it will set the default archive so that you do not need to
use that option.tla my-default-archive <name-of-archive>
This step tells tla to make the necessary metadata and directory
structure for your new project in the archive you just made.
You should select a branch name for your project. This usually
consists of something like name_of_project--type--NN. If you are
making a custom version of another project, use your initials for
"type", or some other similar nomenclature. NN can be either the name
of the version of this project, or just "0" or "1.0" if you don't want
to bother with it too much.
tla archive-setup <branch name>
For example, say your name is Jane A. Doe and you want to make a branch of Projects: Emacs Muse. You'd do something like the following.
tla archive-setup muse--jad--1.0
This step adds Arch metadata to the directory structure where your source code is located.
To make your own customized branch of Muse, follow these steps.
tla register-archive http://www.mwolson.org/archives/2006 tla get -A mwolson@gnu.org--2006 muse--main--1.0 muse
tla tag mwolson@gnu.org--2006/muse--main--1.0 \
your@archive.com--YYYY/muse--jad--1.0
At this point, you can begin hacking on your custom branch and adding changes.
If you don't like what I did in a certain patch, say "patch-31" for example, do something like the following instead of the previous example invocation.
tla tag mwolson@gnu.org--2006/muse--main--1.0--patch-30 \
your@archive.com--YYYY/muse--jad--1.0
This only gets up to patch-30 from the source code.
Say you have a directory for a project that you've already started. You will use a different method to get your project working with Arch. The directory that contains your project is called a source tree.
tla init-tree your@archive.com--YYYY/myproject--main--1.0
tla add name-of-source-directory cd name-of-source-directory tla add-id *.[ch] cd .. tla add-id name-of-doc-directory cd name-of-doc-directory tla add-id *.txt another_file yet_another_file cd .. ...
In other words, you need to run tla add-id on every directory and
file that is contained in your source tree. Skip the {arch} and
.arch-ids directories — those are created automatically by Arch.
If your needs are more complicated, like having to include a binary file with your project (no idea why you would want to do that though), check out http://regexps.srparish.net/tutorial-tla/inventories.html#Project_Tree_Inventories.
tla tree-lint in
the top-level directory of your source tree. If you see files
listed in the output of that command, Arch does not know what to do
with them. It's best to add them before moving on to the next step.-s option tells Arch
what the summary field of the first ChangeLog entry should look
like.tla import -s "Initial import"
To check out an archive, run the following command, substituting the
branch name for {branch-name} and the destination directory for
{dest-dir}.
tla get -A mwolson@gnu.org--2006 {branch-name} {dest-dir}
or, equivalently:
tla get mwolson@gnu.org--2006/{branch-name} {dest-dir}
This will check out a copy of the given project and put it in the
{dest-dir} subdirectory of your current directory.
To keep up to date on the latest changes, navigate to the directory that you specified when checking out the project and do the following.
tla missing tla update
The first command will show what changesets you are missing from me. The second command will download and merge those changes for you, preserving any local changes that you have made. I usually just skip the first command when I update from the Arch repositories of other projects.
By now, you have successfully set up an Arch project of some sort.
If you would like to learn how to put Arch to use on a daily basis and integrate it with Emacs, Part 2 of the tutorial is Developing With Arch.
[ This is Part 1: Getting Started With Arch ]
[ Next is Part 2: Developing With Arch ]