Sponsored Content
Full Discussion: RCS Issue
Top Forums UNIX for Dummies Questions & Answers RCS Issue Post 302556558 by cdoyle on Monday 19th of September 2011 10:40:40 AM
Old 09-19-2011
RCS Issue

Hi there, I am trying to utalise RCS on unix. I am including the following tags in my source code for RCS to populate based on rlog.

#$Author:$
#$Log:$

Everything i have read on the "co" man page of RCS indicates that the lines from the Log will be populated in the source file using the same char that comes before the "$Log:$" tag. However the problem i have is that the Log lines do not get started with the # and as such unix shell tries to execute these.

Code:
#!/bin/ksh

#######################################
# A simple test script                #
#                                     #
# Apps:                               #
# DBs:                                #
#                                     #
# $Author: usimbea $
#                                     #
#$Log:  chris_rcs_test.ksh,v $
Revision 1.10  2011/09/19  10:04:42  10:04:42  usimbea (USIM user)
*** empty log message ***
                                     #
#                                     #
#                                     #
#######################################



Can anyone tell me why the log lines are notbeing populated with # at the start of the line.

---------- Post updated at 03:40 PM ---------- Previous update was at 10:16 AM ----------

After some digging I have found that RCS sets the comment leader based on the file extention of the file being checked in.

The full table can be see in the man page of RCS.

In my case I am using ".ksh" file extention which RCS does not have in its table so didnt generate a comment leader.

This can be addressed by setting a comment leader after checking the file in

rcs -c"# " file.ksh


This will set the comment leader to the string value in the -c.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

RCS, what is it? how do i install it...

One of our DBAs is requesting RCS be installed on one of our boxes...what is it? Where do I get it from? Thanks. (2 Replies)
Discussion started by: debaire
2 Replies

2. UNIX for Dummies Questions & Answers

RCS Question

I am a new user. Can anyone tell me where I can get documentation on the RCS feature? Thanks (1 Reply)
Discussion started by: Terry
1 Replies

3. UNIX for Advanced & Expert Users

rcs,sccs

I am not really sure whether i am posting this question in the right forum.....Can someone tell me why I should go for a rational Clearcase version controller when I can use the version controllers 'rcs' or 'sccs' available in UNIX. I want to know the advantage of Rational over these two. Also, I... (2 Replies)
Discussion started by: Abhishek Ghose
2 Replies

4. UNIX for Dummies Questions & Answers

Rcs

does anyone know if RCS is part of UNIX? Does a copy come with all UNIX systesm? Is it a seperate program? Is it purchased? Or is RSC a freeware program downloaded for everyone to use? (3 Replies)
Discussion started by: rtoba
3 Replies

5. Shell Programming and Scripting

creating an RCS archive in /etc

Hi Why is creating an RCS archive in /etc a "good thing"? Hi Why is creating an RCS archive in /etc a "good thing"? (2 Replies)
Discussion started by: scofiled83
2 Replies

6. Shell Programming and Scripting

RCS archive in /etc

Well it is not a bad idea. I have worked for one place that did that. It wasn't my idea but I did not object. The reason it is done is to put critical files like nsswitch.conf, hosts, and so on under RCS control. Previous versions are then available to see how stuff changed over the years. ... (0 Replies)
Discussion started by: Perderabo
0 Replies

7. Linux

Migrating RCS from HP-UX to Linux

Hello all, We would be migrating from HP-UX 11 to Red Hat Linux 5 shortly. On HP-UX we've been using RCS (Revision Control system). On RHEL I think there is an equivilant utility called Subversion..Is there a way to export the current contents from RCS in HP-UX and import it into Linux's... (2 Replies)
Discussion started by: luft
2 Replies

8. UNIX for Dummies Questions & Answers

suppress RCS messages

ci filename This command displays a message. I don't want it to. How can I keep RCS from doing so? (5 Replies)
Discussion started by: robin_simple
5 Replies
RCS(1)							      General Commands Manual							    RCS(1)

NAME
rcs - change RCS file attributes SYNOPSIS
rcs options file ... DESCRIPTION
rcs creates new RCS files or changes attributes of existing ones. An RCS file contains multiple revisions of text, an access list, a change log, descriptive text, and some control attributes. For rcs to work, the caller's login name must be on the access list, except if the access list is empty, the caller is the owner of the file or the superuser, or the -i option is present. Pathnames matching an RCS suffix denote RCS files; all others denote working files. Names are paired as explained in ci(1). Revision num- bers use the syntax described in ci(1). OPTIONS
-i Create and initialize a new RCS file, but do not deposit any revision. If the RCS file has no path prefix, try to place it first into the subdirectory ./RCS, and then into the current directory. If the RCS file already exists, print an error message. -alogins Append the login names appearing in the comma-separated list logins to the access list of the RCS file. -Aoldfile Append the access list of oldfile to the access list of the RCS file. -e[logins] Erase the login names appearing in the comma-separated list logins from the access list of the RCS file. If logins is omitted, erase the entire access list. -b[rev] Set the default branch to rev. If rev is omitted, the default branch is reset to the (dynamically) highest branch on the trunk. -cstring Set the comment leader to string. An initial ci, or an rcs -i without -c, guesses the comment leader from the suffix of the working filename. This option is obsolescent, since RCS normally uses the preceding $Log$ line's prefix when inserting log lines during checkout (see co(1)). However, older versions of RCS use the comment leader instead of the $Log$ line's prefix, so if you plan to access a file with both old and new versions of RCS, make sure its comment leader matches its $Log$ line prefix. -ksubst Set the default keyword substitution to subst. The effect of keyword substitution is described in co(1). Giving an explicit -k option to co, rcsdiff, and rcsmerge overrides this default. Beware rcs -kv, because -kv is incompatible with co -l. Use rcs -kkv to restore the normal default keyword substitution. -l[rev] Lock the revision with number rev. If a branch is given, lock the latest revision on that branch. If rev is omitted, lock the lat- est revision on the default branch. Locking prevents overlapping changes. If someone else already holds the lock, the lock is bro- ken as with rcs -u (see below). -u[rev] Unlock the revision with number rev. If a branch is given, unlock the latest revision on that branch. If rev is omitted, remove the latest lock held by the caller. Normally, only the locker of a revision can unlock it. Somebody else unlocking a revision breaks the lock. This causes a mail message to be sent to the original locker. The message contains a commentary solicited from the breaker. The commentary is terminated by end-of-file or by a line containing . by itself. -L Set locking to strict. Strict locking means that the owner of an RCS file is not exempt from locking for checkin. This option should be used for files that are shared. -U Set locking to non-strict. Non-strict locking means that the owner of a file need not lock a revision for checkin. This option should not be used for files that are shared. Whether default locking is strict is determined by your system administrator, but it is normally strict. -mrev:msg Replace revision rev's log message with msg. -M Do not send mail when breaking somebody else's lock. This option is not meant for casual use; it is meant for programs that warn users by other means, and invoke rcs -u only as a low-level lock-breaking operation. -nname[:[rev]] Associate the symbolic name name with the branch or revision rev. Delete the symbolic name if both : and rev are omitted; other- wise, print an error message if name is already associated with another number. If rev is symbolic, it is expanded before associa- tion. A rev consisting of a branch number followed by a . stands for the current latest revision in the branch. A : with an empty rev stands for the current latest revision on the default branch, normally the trunk. For example, rcs -nname: RCS/* associates name with the current latest revision of all the named RCS files; this contrasts with rcs -nname:$ RCS/* which associates name with the revision numbers extracted from keyword strings in the corresponding working files. -Nname[:[rev]] Act like -n, except override any previous assignment of name. -orange deletes ("outdates") the revisions given by range. A range consisting of a single revision number means that revision. A range consisting of a branch number means the latest revision on that branch. A range of the form rev1:rev2 means revisions rev1 to rev2 on the same branch, :rev means from the beginning of the branch containing rev up to and including rev, and rev: means from revision rev to the end of the branch containing rev. None of the outdated revisions can have branches or locks. -q Run quietly; do not print diagnostics. -I Run interactively, even if the standard input is not a terminal. -sstate[:rev] Set the state attribute of the revision rev to state. If rev is a branch number, assume the latest revision on that branch. If rev is omitted, assume the latest revision on the default branch. Any identifier is acceptable for state. A useful set of states is Exp (for experimental), Stab (for stable), and Rel (for released). By default, ci(1) sets the state of a revision to Exp. -t[file] Write descriptive text from the contents of the named file into the RCS file, deleting the existing text. The file pathname cannot begin with -. If file is omitted, obtain the text from standard input, terminated by end-of-file or by a line containing . by itself. Prompt for the text if interaction is possible; see -I. With -i, descriptive text is obtained even if -t is not given. -t-string Write descriptive text from the string into the RCS file, deleting the existing text. -T Preserve the modification time on the RCS file unless a revision is removed. This option can suppress extensive recompilation caused by a make(1) dependency of some copy of the working file on the RCS file. Use this option with care; it can suppress recom- pilation even when it is needed, i.e. when a change to the RCS file would mean a change to keyword strings in the working file. -V Print RCS's version number. -Vn Emulate RCS version n. See co(1) for details. -xsuffixes Use suffixes to characterize RCS files. See ci(1) for details. -zzone Use zone as the default time zone. This option has no effect; it is present for compatibility with other RCS commands. At least one explicit option must be given, to ensure compatibility with future planned extensions to the rcs command. COMPATIBILITY
The -brev option generates an RCS file that cannot be parsed by RCS version 3 or earlier. The -ksubst options (except -kkv) generate an RCS file that cannot be parsed by RCS version 4 or earlier. Use rcs -Vn to make an RCS file acceptable to RCS version n by discarding information that would confuse version n. RCS version 5.5 and earlier does not support the -x option, and requires a ,v suffix on an RCS pathname. FILES
rcs accesses files much as ci(1) does, except that it uses the effective user for all accesses, it does not write the working file or its directory, and it does not even read the working file unless a revision number of $ is specified. ENVIRONMENT
RCSINIT options prepended to the argument list, separated by spaces. See ci(1) for details. DIAGNOSTICS
The RCS pathname and the revisions outdated are written to the diagnostic output. The exit status is zero if and only if all operations were successful. IDENTIFICATION
Author: Walter F. Tichy. Manual Page Revision: ; Release Date: . Copyright (C) 1982, 1988, 1989 Walter F. Tichy. Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995 Paul Eggert. SEE ALSO
rcsintro(1), co(1), ci(1), ident(1), rcsclean(1), rcsdiff(1), rcsmerge(1), rlog(1), rcsfile(5) Walter F. Tichy, RCS--A System for Version Control, Software--Practice Experience 15, 7 (July 1985), 637-654. BUGS
A catastrophe (e.g. a system crash) can cause RCS to leave behind a semaphore file that causes later invocations of RCS to claim that the RCS file is in use. To fix this, remove the semaphore file. A semaphore file's name typically begins with , or ends with _. The separator for revision ranges in the -o option used to be - instead of :, but this leads to confusion when symbolic names contain -. For backwards compatibility rcs -o still supports the old - separator, but it warns about this obsolete use. Symbolic names need not refer to existing revisions or branches. For example, the -o option does not remove symbolic names for the out- dated revisions; you must use -n to remove the names. GNU
RCS(1)
All times are GMT -4. The time now is 09:24 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy