Re: RCS vs SCCS?
Posted in 1996
> code: > > call catastrophy("%M%(%C%) ",sqlca.sqlcode) > We like to assign the RCS $Header: $ string to a program variable so that the executable can be identified: LET ident = '@(#)$Header: $' >what ab_ui ab_ui: $Header: pic_main.4gl,v 1.54 95/04/03 19:53:54 hmgr Exp $ $Header: ml_flag.4gl,v 1.12 94/03/30 14:37:56 hmgr Exp $ $Header: pic_bwse.4gl,v 1.7 94/09/16 11:39:32 hmgr Exp $ $Header: pic_tran.4gl,v 1.21 95/10/30 14:38:10 hmgr Exp $ $Header: pictoab.4gl,v 1.82 95/05/18 16:24:02 hmgr Exp $ $Header: pic_rpt.4gl,v 1.38 94/09/07 13:24:13 hmgr Exp $ $Header: pic_edit.4gl,v 1.6 94/11/04 17:18:24 hmgr Exp $ $Header: pic_slnk.4gl,v 1.6 94/11/04 17:19:45 hmgr Exp $ etc The nice thing about this is that you can see the version of EACH source file making up the executable. We also use $Log: $ within a comment block to keep source modification log info in the source file itself: { $Log: dbdiff2.4gl,v $ Revision 1.4 95/06/14 12:49:50 12:49:50 jparker (Jack Parker) s1/s2 switches made to work again (Cathy Kipp) Typo in incorporating triggers/procedures o_systabs should be o_systables Triggers and Procedures changed to use fold_and_push() column can now be added BEFORE the first existing column (Kerry) Typo line 1033 (John Fowler) log() changed to logg() (J Fowler) Intervals with a precision (e.g. DAY(3) TO DAY) are now handled (jp) Defaulted Constraints, User permissions and SPLs to ON. Bug fix - when doing USER and not AUTH would crash - corrected. SPL function no longer drops core. General - added support for SPL, triggers and constraints. Some bug fixes. Revision 1.3 94/09/01 13:39:25 13:39:25 jparker (Jack Parker) Corrected DATETIME/INTERVAL to print proper end points Corrected DATETIME/INTERVAL to not include parens Now handles DECIMAL(n) and DECIMAL(n,0) Now handles DESCending indices. Corrected syntax for BEFORE in the ALTER TABLE clause etc. I like your error routine thing, we just use arg(0) there. (Then do a 'what' within the error routine to get version info.) We also set the state of the source with rcs through the make file: make set_state state=rls_1.2 (set_state does an rcs -s$(state) $(SRC)) which stamps the current version of each RCS file as rls_1.2. THEN when you need to recompile or checkout a previous release you can: make ckout state=rls_1.2 all (ckout does a co -s$(state), the all then compiles it) This is currently saving my bacon BIG time, I've got one warehouse using one release of the code and a second warehouse using a previous release - to which they want changes. Until such time as I get them upgraded the ability to check out a previous release, fix a single source module and recompile that release is a real boon. other things we do? rcsdiff (difference between current and checked in version) rlog (history of changes to source) rlog -L -R (list all checked out modules) rlog -d>date (list changes since date) make dist (compile and 'dist'ribute to production all code) Something I've been meaning to try - as soon as I get the odd moment is doing a SUFFIXES line of ".o .4gl~" which will indicate that make 'knows' (because you are about to teach it) how to make a .o file from a checked in source file. The point is not that RCS is better than SCCS - all of this stuff is available through SCCS as well. Just that RCS (or SCCS) can be a very useful configuration control tool. When paired with make you can do some fairly exciting stuff. Peruse The Fine Man pages - man -k rcs or sccs - you might get some neat ideas. (on hp-ux there is a special man page for starting RCS - man rcsintro). Alternatively you could wait 6 months till I finish writing the book (about 4 months after I START writing it :-) ). cheers j. _____________________________________________________________________________ Jack Parker - Hewlett Packard, DMD/IS Boise, Idaho, USA jparker@hpbs3645.boi.hp.com _____________________________________________________________________________ If anything can go wrong, fix it. To hell with Murphy. _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________