From owner-freebsd-doc Tue Aug 5 02:01:14 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id CAA01374 for doc-outgoing; Tue, 5 Aug 1997 02:01:14 -0700 (PDT) Received: from critter.dk.tfs.com ([140.145.230.252]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id CAA01367 for ; Tue, 5 Aug 1997 02:01:10 -0700 (PDT) Received: from critter.dk.tfs.com (localhost [127.0.0.1]) by critter.dk.tfs.com (8.8.6/8.8.5) with ESMTP id KAA00648; Tue, 5 Aug 1997 10:53:22 +0200 (CEST) To: A Joseph Koshy cc: freebsd-doc@freebsd.org From: Poul-Henning Kamp Subject: Re: Update to CTM tutorial In-reply-to: Your message of "Thu, 31 Jul 1997 20:30:13 +0530." <199707311502.IAA09373@palrel3.hp.com> Date: Tue, 05 Aug 1997 10:53:22 +0200 Message-ID: <646.870771202@critter.dk.tfs.com> Sender: owner-freebsd-doc@freebsd.org X-Loop: FreeBSD.org Precedence: bulk seems ok to me :-) Poul-Henning In message <199707311502.IAA09373@palrel3.hp.com>, A Joseph Koshy writes: > >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. > > a > central one. It has been developed for usage with FreeBSD's source >@@ -108,11 +108,13 @@ > all deltas with higher numbers following it. > > 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.* >+ >+

> 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 > cleanly to your current tree. > >- There are other options to - for more details. >+ There are other options to + or look in the sources for more information. > > 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 >@@ -137,24 +139,69 @@ > Even if you only have floppy disks, consider using make a copy. > >+ 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 updateheading> >+

>+ 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 + Use some kind of authentication into the CTM system, so as to >+ allow detection of spoofed CTM updates. > > Clean up the options to counter intuitive. -- Poul-Henning Kamp | phk@FreeBSD.ORG FreeBSD Core-team. http://www.freebsd.org/~phk | phk@login.dknet.dk Private mailbox. whois: [PHK] | phk@tfs.com TRW Financial Systems, Inc. Power and ignorance is a disgusting cocktail.