[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to remove an RCS entry?

From: Bob Proulx
Subject: Re: How to remove an RCS entry?
Date: Mon, 14 Jul 2008 00:39:39 -0600
User-agent: Mutt/1.5.13 (2006-08-11)

Gau, Terry wrote:
> How do I back out an RCS entry without touching the source file.
> Incorrect log information was entered and needs to be replaced.

To update the log message you will need to replace the entire log
message with the correct one.  Use the 'rcs -mREV:MSG' command.

              Replace revision rev's log message with msg.

So normally you would use something like 'rlog file' to get the
previous log message and then you can use it to update the
replacement.  I typically put the replacement message in a text file
and edit it there.  Then use the shell to replace it on the command

  rlog somefile > logmessage.txt
  editor logmessage.txt
  rcs -m1.42:"$(<logmessage.txt)"

That assumes a POSIX or Bash shell for the "$(<...)" expansion.  If
you only have the old Bourne shell the syntax is "`cat logmessage.txt`" 
instead.  Replace 1.42 with the version you want to update.

> Once the bad entry is removed, ci will be run again to process the
> source file.  I need to re-use the file revision number.

If you simply edit the log message as in the above then you don't need
to back out the change and check it in again.

If you really want to discard a committed change then you would use
the 'rcs -o' option.  WARNING: This deletes information from the rcs
file.  I know if I don't say that someone would complain that they
lost data by using it.  Rather like rm does when it removes a file.

              deletes ("outdates") the revisions given by range.  A range con-
              sisting 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.

> The checkin syntax used is.....
> ci -d -l -M filename.

Are you sure you are concerned about preserving the original timestamp
on the file?  Normally it is better to let the file's timestamp float
to the latest modifications.

> This email message is for the sole use of the intended recipient(s) and
> may contain confidential information. Any unauthorized review, use,
> disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message.

Terribly annoying when sent to public mailing lists asking for help.
Please consider using one of the many free email services which do not
attach annoying and useless disclaimers.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]