First of all, RCS is a perfectly good option if you have single files you want to control. It is less complex than git and has a more understandable method of naming 'revisions' - it is much easier to understand versions 1.1 and 1.2 compared to the git commit SHA-1 checksums. In my lab, we continue to use it for text/troff/groff files, shell scripts, perl scripts, Makefiles, and rmarkdown files where they are standalone - although we use git for most complex projects. We have shell and perl script that are more than 30 years old that RCS still works on. RCS is NOT great for files that form part of a system, package, project etc. Use git for that.
To answer your question you need to understand how RCS works.
1 - after you did the initial check-in of your script you would have had 1 or 2 files:
filename.py,v
(the RCS 'database' of your file) and possibly
filename.py
(your original code).
If you did the check-in with
ci -l filename.py
that would have given you both files, but if you just ran
ci filename.py
RCS would have checked your python script into the RCS file (with the trailing ,v
) and removed your original.
2 - To get your usable python script out you need to check it out. If you want to check it out to work on it, then run:
co -l filename.py
The
-l
means 'lock the file out exclusively to me' - which is what you want when you are editing it.
At this stage you should be able to edit and run the script filename.py
- NOTE that you will not and should not be trying to run the filename.py,v
file - that is the database where your changes are recorded.
After each significant edit you will need to check the changes in - if it is you solely working on the file then
ci -l filename.py
is the easiest as it checks in your changes and keeps the source file available to you for you to edit.
Once you have a final tested script you would usually check in the last set of changes and then copy the source file to wherever you are deploying it - perhaps /usr/local/bin
.
I would advise you to place a
$Revision$
string somewhere in the comments section of the file so you can tell which version you have deployed. After you check in the file this will look something like this:
$Revision: 1.2 $
and will change each time.
Lots of RCS tutorials around but a quick version is here.