[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to delete file in RCS
From: |
Dario Niedermann |
Subject: |
Re: How to delete file in RCS |
Date: |
Thu, 4 Nov 2021 10:39:40 +0100 |
User-agent: |
Mutt/1.12.1 (2019-06-15) |
Il 04/11/2021 alle 04:06, Sam Lee ha scritto:
Now, I want to remove one file from the
project (because it has become useless after I refactored my code).
[...]
I cannot do `rm RCS/useless.c,v` because I want to preserve history
(i.e. I want to be able to build old versions of my software). Instead,
I could simply delete the contents of the file and check in the empty
file (i.e. `co -l useless.c`, followed by `> useless.c` to delete the
contents, followed by `ci -m'Emptied the file' useless.c`). However,
`co RCS/*,v` would still check out the file. This is messy if I have
many "deleted" files, because `co RCS/*,v` would check out all the
"deleted" files too.
I sometimes create a directory inside RCS/ where I put all the obsolete
files.
The best approach, though, is to have `make` check out the files as they
are needed. So you never have to do "the big check out" on RCS/*,v.
If 'useless.c' is never mentioned in the Makefile as a prerequisite,
it won't be checked out.
GNU Make has this feature out of the box, but a last-resort rule to
check out needed files is easy enough to implement in makefiles for
other `make` versions that aren't RCS-savvy.
--
Dario Niedermann -:- finger my email address for PGP key, etc.
Also on the Internet at: <gopher://darioniedermann.it/>
<https://www.darioniedermann.it/>