[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
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 (but not two dashes in a row). 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:
% arx 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:
% arx make-archive \ joe.hacker@gnu.org--test-archive \ ~/{test-archive} |
ArX
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:
% arx 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:
% arx register-archive ARCHIVE-NAME LOCATION |
records a new archive location or changes an old one. The command:
% arx 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:
% arx whereis-archive ARCHIVE-NAME LOCATION |
There are four ways to set up a remote archive: ftp, wu-ftp, sftp, and http. The wu-ftp method works around some bugs in wu-ftpd's implementation of the ftp protocol.
The first thing that you have to do is set up the (s)ftp or http server on the remote machine. ArX does NOT have to be installed.
There are two ways that http access can work.
This is the recommended and most reliable way. For apache, this usually involves installing the mod_dav modules. This will work with apache 1.3 or later. Then you have to add something like the following to the conf file for apache:
<Directory /home/*/public_html> DAV On AllowOverride FileInfo AuthConfig Limit Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec <Limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </Limit> <Limit PUT DELETE PATCH PROPPATCH MKCOL COPY MOVE LOCK UNLOCK> Order deny,allow Deny from all </Limit> </Directory> |
You might have to change the first line of that to make it point to where your archives are.
This should only be used if you are unable to install webdav support on your server. You do this by creating a listing file. One idiom to do this is with the command
find . -type d -exec sh -c "(cd {}; ls | sed -e 's/$/^M/' > .listing)" \; ^ this is CTRL-M ---! |
You will have to run this script each time you update the archive.
Setting up the sftp server generally requires just setting up an ssh server. On Debian systems, there is a bug in the default config file (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=141979).
You can access the archive by specifying the uri:
ftp://[user@]host/dir # passive ftp wu-ftp://[user@]host/dir # passive ftp with wu-ftp sftp://[user@]host/dir # the ssh ftp protocol http[s]://[user@]host[:port]/dir # webdav |
ArX
saves the location in your .arch-params
directory,
and it is made unreadable to anyone but you. Pretty worthless
security, so don't rely on it. Currently, https is not implemented,
so the only way to create secure remote writeable archives is with
sftp.
As a concrete example, to register an anonymous ftp server, the command would look something like
% arx register-archive joe.hacker@gnu.org--test-archive \ ftp://anonymous@ftp.gnu.org/users/joe/{test-archive} |
and then you can treat it like a local, read-only archive. For an http server, it would look like
% arx register-archive joe.hacker@gnu.org--test-archive \ http://www.gnu.org/~joe/{test-archive} |
Using ArX
is generally simplified by setting a default archive --
the archive to use by default when no other is specified.
The command:
% arx my-default-archive [options] [archive] |
can be used to set or check your default archive. (This command was previously introduced. See Archive Names.)
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |