regexps.com
This chapter discusses archives -- places where revisions can stored and shared. Archives are used to keep a detailed history of how a project evolves. They are used to help a team of developers stay "in sync" -- in agreement about what the official, latest revision of a project really is. Archives are used to help coordinate divergent development paths (branches) and to merge changes between branches.
Every archive has a name which should be globally unique. These names were previously introduced in the context of project names generally (see Archive Names.)
To briefly review, an archive name consists of an email address (with complete hostname), followed by "--", followed by an additional string of numbers, letters and dashes. Choose an email address which is exclusively yours (or your project's). That way, your archive name will be globally unique. Here is an example:
joe.hacker@gnu.org--test-archive
To create a new archive on a local file system, use the make-archive
command:
% larch make-archive NAME LOCATION
The NAME
is the name for the archive. The LOCATION
is a name for
a directory that will be created to hold the archive. For example:
% larch make-archive \ joe.hacker@gnu.org--test-archive \ ~/{test-archive}
arch
maintains a mapping of archive names to archive locations
separately for each user, in the directory ~/.arch-params
.
You can see the list of archives for which you have a recorded
location by using the archives
command, as in this example:
% larch archives joe.hacker@gnu.org--test-archive /home/joe/{test-archive}
The command register-archive
is used to add, remove, or update the
location of an archive:
% larch register-archive ARCHIVE-NAME LOCATION
records a new archive location or changes an old one. The command:
% larch register-archive -d ARCHIVE-NAME
removes the record of an archive location.
If you want to know the registered location of a particular archive, you can use:
% larch whereis-archive ARCHIVE-NAME LOCATION
If an archive directory is accessible via FTP
, then arch
can
access that archive remotely, simply by specifying an FTP URI for the
archive's location:
% larch register-archive joe.hacker@gnu.org--test-archive \ ftp://anonymous@ftp.gnu.org/users/joe/{test-archive}
The URI can include a password. When arch
saves a location in your
.arch-params
directory, it is made unreadable to anyone but you --
weak security, but security nonetheless.
Using arch
is generally simplified by setting a
default archive
--
the archive to use by default when no other is specified.
The command:
% larch my-default-archive [options] [archive]
can be used to set or check your default archive. (This command was previously introduced. See Archive Names.)
In general, arch
sub-commands accept the option -A
to specify a
non-default archive:
% larch categories -A joe.hacker@gnu.org--test-archivearch: The arch Revision Control System
regexps.com