Projects - Developing With Arch
This document covers the basic routine for committing patches with Arch. The use of Emacs is emphasized.
[ Top: Arch Tutorial ]
[ Previous is Part 1: Getting Started With Arch ]
[ This is Part 2: Developing With Arch ]
[ Next is Part 3: Cooperation and Arch ]
I recommend using DVC to do Arch tasks from within Emacs. This
tutorial will make use of it, but will also provide command line
equivalents of each action.
You can get the latest DVC snapshot at
http://download.gna.org/xtla-el/dvc-snapshot.tar.gz. For a quick
install, do mkdir ++build, cd ++build, ../configure, make, and make
install. Then just add the following to your .emacs, and you're
ready to begin using it.
(require 'tla) (require 'tla-browse)
If you have at least a mild case of AD(H)D like me, it's easy to
forget to document a ChangeLog entry that you made. In order to see
every change that you made to a source tree, navigate to a file or
directory that is part of your source tree and type C-x T
=. The command line equivalent of that is the following.
tla changes --diffs
If you are not using DVC, use the tla make-log command in your
top-level working directory. Edit the new file that is created as
described in the Anatomy of a change log entry section.
If you are using DVC, bring up a list of changes that you made as
described in the What changes did I make? section. On each hunk of
the displayed differences, type C-x T a. This opens up a log file
(creating one if it doesn't already exist) and begins a sort of
ChangeLog entry. Complete each entry with a description of the
changes you made.
There are two ways to perform the commit. One way is to type
C-c C-c in the commit log buffer. Another way is to type
M-x tla-commit in any buffer that corresponds to a file
or directory in your source tree. The command line version follows.
tla commit
Arch has the ability to output a somewhat non-standard ChangeLog based
on your commit log messages. To see it in Emacs, do C-x T
l or M-x tla-changelog. Alternatively, run the
following tla command. $PAGER represents your file viewer of choice.
tla changelog | $PAGER
Instead of maintaining a separate ChangeLog file with your project,
you could opt to have Arch keep a ChangeLog file up to date
automatically whenever you commit a change. This is not recommended,
because it can be very inflexible to work with.
To set up the ChangeLog file, run the following commands in the top
level of your source tree.
tla changelog > ChangeLog tla add ChangeLog
Then make a commit. From this point on, Arch will automatically
update your ChangeLog file for you whenever you commit changes.
[ Previous is Part 1: Getting Started With Arch ]
[ This is Part 2: Developing With Arch ]
[ Next is Part 3: Cooperation and Arch ]