From owner-freebsd-doc Thu Jul 31 08:02:13 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id IAA13817 for doc-outgoing; Thu, 31 Jul 1997 08:02:13 -0700 (PDT) Received: from palrel3.hp.com (palrel3.hp.com [156.153.255.219]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id IAA13811; Thu, 31 Jul 1997 08:02:11 -0700 (PDT) Received: from postbox.india.hp.com (postbox.india.hp.com [15.10.45.1]) by palrel3.hp.com (8.8.5/8.8.5) with ESMTP id IAA09373; Thu, 31 Jul 1997 08:02:02 -0700 (PDT) Message-Id: <199707311502.IAA09373@palrel3.hp.com> Received: from localhost by postbox.india.hp.com with ESMTP (1.39.111.2/16.2) id AA021321213; Thu, 31 Jul 1997 20:30:13 +0530 To: phk@freebsd.org, freebsd-doc@freebsd.org Subject: Update to CTM tutorial Date: Thu, 31 Jul 1997 20:30:13 +0530 From: A Joseph Koshy Sender: owner-freebsd-doc@freebsd.org X-Loop: FreeBSD.org Precedence: bulk Hi, I found the CTM tutorial in the Handbook a bit dated so I've done the needful and added a new section to it while at the job. Could someone please commit this? Koshy My Personal Opinions Only. Index: ctm.sgml =================================================================== RCS file: /usr/cvs/doc/handbook/ctm.sgml,v retrieving revision 1.19 diff -u -r1.19 ctm.sgml --- ctm.sgml 1997/06/02 16:42:21 1.19 +++ ctm.sgml 1997/07/31 15:32:59 @@ -16,7 +16,7 @@ CTM -

Contributed by &a.phk;. Updated 16-Mar-1995. +

Contributed by &a.phk;. Updated 31-July-1997. Using -

To apply the deltas, simply say - - cd /where/ever/you/want/the/stuff - ctm -v -v /where/you/store/your/deltas/src-cur.* - +

+ To apply the deltas, simply say: + +cd /where/ever/you/want/the/stuff +ctm -v -v /where/you/store/your/deltas/src-cur.* + +

Keeping your local changes +

+ 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 + foo, it first looks for foo.ctm. If this + file exists, CTM will operate on it instead of foo. +

+ 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 .ctm suffix. Then you can freely hack + the code, while CTM keeps the .ctm file upto-date. + + Other interesting CTM options + Finding out exactly what would be touched by an update +

+ You can determine the list of changes that CTM will make on your + source repository using the ``-l'' option to CTM. +

+ 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 :-). + + Making backups before updating +

+ Sometimes you may want to backup all the files that would be changed + by a CTM update. +

+ Specifying the ``-B backup-file'' option causes + CTM to backup all files that would be touched by a given CTM + delta to backup-file. - Future plans for + Restricting the files touched by an update +

+ 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. +

+ You can control the list of files that CTM would operate on by + specifying filtering regular expressions using the + ``-e'' and ``-x'' options. +

+ For example, to extract an upto-date copy of + lib/libc/Makefile from your collection of saved CTM deltas, + run the commands: + +cd /where/ever/you/want/to/extract/it/ +ctm -e '^lib/libc/Makefile' ~ctm/src-cur.* + +

+ For every file specified in a CTM delta, the ``-e'' and + ``-x'' 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 ``-e'' and + ``-x'' options are applied to it. + + Future plans for

Tons of them: - Make local modifications to the tree possible. One way to do - it could be this:

When foo/bar.c'', it would first check for the existence - of foo/bar.c#CTM If this file exists, the delta is - applied to it instead. This way the foo/bar.c file - can be edited to suit local needs. - - Make a ``restore file(s)'' option to - ctm -r src/sys/i386/wd.c /here/are/my/deltas/src-cur.* - - would restore Clean up the options to