Sometimes, a file under the control of RCS gets modified while it is not locked (= checked out for modification by me).
(In these cases, it was actually set read-only by RCS to prevent such modifications; but it might have been a configuration file under /etc/ which was modified because I was upgrading packages.)
And then usually I want to nevertheless commit the new modifications, as if the last revision has been checked out before the modification.
How is it best to proceed then?
I usually use Emacs VC, and do C-x v v
to check out and in. But if the file hasn't been checked out beforehand, this fails. Is there a way to proceed specifically from within Emacs? But answers with shell commands are also welcome.
Best Answer
Actually it's much simpler. You can just do
rcs -l
to lock it, then try check it back in again.I assume the situation when you asked the question was something like this:
At this point, both
ci
andco
will fail:This is how you can lock the file and commit the changes: