Update the CTM section of the handbook.

Reviewed by:	phk
Submitted by:	A Joseph Koshy <koshy@india.hp.com>
This commit is contained in:
Eivind Eklund 1997-08-11 13:36:04 +00:00
parent 7722d3e406
commit 2eab32eb7c
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=1808

View file

@ -3,7 +3,7 @@
# #
# Converted by Ollivier Robert <roberto@FreeBSD.ORG> # Converted by Ollivier Robert <roberto@FreeBSD.ORG>
# #
# $Id: ctm.sgml,v 1.19 1997-06-02 16:42:21 max Exp $ # $Id: ctm.sgml,v 1.20 1997-08-11 13:36:04 eivind Exp $
# #
# ---------------------------------------------------------------------------- # ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42): # "THE BEER-WARE LICENSE" (Revision 42):
@ -16,7 +16,7 @@
<sect1><heading>CTM<label id="ctm"></heading> <sect1><heading>CTM<label id="ctm"></heading>
<p><em>Contributed by &a.phk;. Updated 16-Mar-1995.</em> <p><em>Contributed by &a.phk;. Updated 31-July-1997.</em>
<tt/CTM/ is a method for keeping a remote directory tree in sync with a <tt/CTM/ is a method for keeping a remote directory tree in sync with a
central one. It has been developed for usage with FreeBSD's source central one. It has been developed for usage with FreeBSD's source
@ -108,11 +108,13 @@
all deltas with higher numbers following it. all deltas with higher numbers following it.
<sect2><heading>Using <tt/CTM/ in your daily life</heading> <sect2><heading>Using <tt/CTM/ in your daily life</heading>
<p>To apply the deltas, simply say <p>
<verb> To apply the deltas, simply say:
cd /where/ever/you/want/the/stuff <tscreen><verb>
ctm -v -v /where/you/store/your/deltas/src-cur.* cd /where/ever/you/want/the/stuff
</verb> ctm -v -v /where/you/store/your/deltas/src-cur.*
</verb></tscreen>
<p>
<tt/CTM/ understands deltas which have been put through <tt/gzip/, <tt/CTM/ understands deltas which have been put through <tt/gzip/,
so you do not need to gunzip them first, this saves disk space. so you do not need to gunzip them first, this saves disk space.
@ -122,8 +124,8 @@
merely verify the integrity of the delta and see if it would apply merely verify the integrity of the delta and see if it would apply
cleanly to your current tree. cleanly to your current tree.
There are other options to <tt/CTM/ as well, look in the sources There are other options to <tt/CTM/ as well, see the manual pages
for more details. or look in the sources for more information.
I would also be very happy if somebody could help with the ``user I would also be very happy if somebody could help with the ``user
interface'' portions, as I have realized that I cannot make up my interface'' portions, as I have realized that I cannot make up my
@ -137,24 +139,69 @@
Even if you only have floppy disks, consider using <tt/fdwrite/ to Even if you only have floppy disks, consider using <tt/fdwrite/ to
make a copy. make a copy.
<sect2><heading>Keeping your local changes</heading>
<p>
As a developer one would like to experiment with and change
files in the source tree. CTM supports local modifications in a
limited way: before checking for the presence of a file
<tt>foo</tt>, it first looks for <tt>foo.ctm</tt>. If this
file exists, CTM will operate on it instead of <tt>foo</tt>.
<p>
This behaviour gives us a simple way to maintain local changes:
simply copy the files you plan to modify to the corresponding
file names with a <tt>.ctm</tt> suffix. Then you can freely hack
the code, while CTM keeps the <tt>.ctm</tt> file upto-date.
<sect2><heading>Other interesting CTM options</heading>
<sect3><heading>Finding out exactly what would be touched by an update</heading>
<p>
You can determine the list of changes that CTM will make on your
source repository using the ``<tt>-l</tt>'' option to CTM.
<p>
This is useful if you would like to keep logs of the changes,
pre- or post- process the modified files in any manner, or just
are feeling a tad paranoid :-).
<sect2><heading>Future plans for <tt/CTM/</heading> <sect3><heading>Making backups before updating</heading>
<p>
Sometimes you may want to backup all the files that would be changed
by a CTM update.
<p>
Specifying the ``<tt>-B backup-file</tt>'' option causes
CTM to backup all files that would be touched by a given CTM
delta to <tt>backup-file</tt>.
<sect3><heading>Restricting the files touched by an update</heading>
<p>
Sometimes you would be interested in restricting the scope of a
given CTM update, or may be interested in extracting just a few
files from a sequence of deltas.
<p>
You can control the list of files that CTM would operate on by
specifying filtering regular expressions using the
``<tt>-e</tt>'' and ``<tt>-x</tt>'' options.
<p>
For example, to extract an upto-date copy of
<tt>lib/libc/Makefile</tt> from your collection of saved CTM deltas,
run the commands:
<tscreen><verb>
cd /where/ever/you/want/to/extract/it/
ctm -e '^lib/libc/Makefile' ~ctm/src-cur.*
</verb></tscreen>
<p>
For every file specified in a CTM delta, the ``<tt>-e</tt>'' and
``<tt>-x</tt>'' options are applied in the order given on the
command line. The file is processed by CTM only if it is
marked as eligible after all the ``<tt>-e</tt>'' and
``<tt>-x</tt>'' options are applied to it.
<sect2><heading>Future plans for <tt/CTM/</heading>
<p> <p>
Tons of them: Tons of them:
<itemize> <itemize>
<item> <item>
Make local modifications to the tree possible. One way to do Use some kind of authentication into the CTM system, so as to
it could be this:<p> When <tt/CTM/ wants to edit the file allow detection of spoofed CTM updates.
``<tt>foo/bar.c</tt>'', it would first check for the existence
of <tt>foo/bar.c&num;CTM</tt> If this file exists, the delta is
applied to it instead. This way the <tt>foo/bar.c</tt> file
can be edited to suit local needs.
<item>
Make a ``restore file(s)'' option to <tt/CTM/, something like:
<verb>
ctm -r src/sys/i386/wd.c /here/are/my/deltas/src-cur.*
</verb>
would restore <tt/wd.c/ to the current status from the files.
<item> <item>
Clean up the options to <tt/CTM/, they became confusing and Clean up the options to <tt/CTM/, they became confusing and
counter intuitive. counter intuitive.