Path: utzoo!utgpu!watmath!iuvax!bsu-cs!dhesi From: dhesi@bsu-cs.bsu.edu (Rahul Dhesi) Newsgroups: comp.unix.questions Subject: Re: SCCS vs RCS Summary: preserving keywords in SCCS Message-ID: <7651@bsu-cs.bsu.edu> Date: 8 Jun 89 22:35:33 GMT References: <19885@adm.BRL.MIL> <2934@mentor.cc.purdue.edu> <10006@mpx2.mpx.com> Reply-To: dhesi@bsu-cs.bsu.edu (Rahul Dhesi) Organization: CS Dept, Ball St U, Muncie, Indiana Lines: 27 In article <10006@mpx2.mpx.com> erik@mpx2.mpx.com (Erik Murrey) writes: >For example, in SCCS, a "%Z%" gets expanded into "@(#)" when checked >out (for compiling), but it cannot collapse that back to "%Z%" if I >check that version in. This is a design bug in SCCS. There is a way around it, provided you use a standard set of sccs keywords in all files. For example: static char sccsid[] = "::[ %lots% %of% %sccs% %keywords% ]::"; Then when you lose keywords in a file, filter it through my "updid" script: #! /bin/sh # usage: updid file ... # Restores lost SCCS keywords between ::[ and ]:: in source files # Copyright 1989 Rahul Dhesi, All rights reserved. Use and # distribution permitted in accordance with the GNU license TMP=T$$ WORDS='::[ %lots% %of% %sccs% %keywords% ]::' for f do sed < $f > $TMP -e "s/::\[.*\]::/$WORDS/" && mv $TMP $f done -- Rahul Dhesi UUCP: ...!{iuvax,pur-ee}!bsu-cs!dhesi Career change search is on -- ask me for my resume