Description of problem:
At my company we use rcs for keeping track configuration file changes.
This is true even when we are making changes to config files via our
libraries that we have written. In some cases we may have multiple
processes running as the same user editing desiring to edit the
same config file. Since they are the same user if the second one
who tries to check out the file will be able to do so, even though
we really wanted rcs to return an error.
Another case, which is more problematic to use is if some piece of code
neglected to check the file in (which is a bug on our side) and then
another program goes to check out the file and it is running as the same
user rcs will allow this to happen.
In both these cases rcs is not exhibiting a bug, it works as designed (locks
are only between seperate users). I would like to suggest an enhancement to
rcs that allows one to request on a check out that locks be obeyed even
for the same user. I am attaching a patch to rcs 5.7 that gives this
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. As a user run "co -l -f" to check out a file and force the
check out (the force is needed for automated operations).
2. Run the same command again.
It checks it out twice, furthermore any changes made to the file after
the first check out and before the second will be lost.
I expected these results (its an RFE (-;).
I am also working this through GNU help-rcs list. Will attach links to the
conversation when they are available on the archive.
Created attachment 95470 [details]
Adds -S to co to allow for obeying of locks for the same user.
-S seemed to be available. The best nomenclature I could come up with
for the feature was same user locks, as strict locks was already used.
If you can think of a better naming convention feel free to change away.
I have done some testing of this with and without the switch, but it
certainly could stand some further testing.
This sounds like a very useful addition.
If you get a response from the GNU folks please let me know (here in
bugzilla) so i can update rcs to a newer GNU version when thats available.
In the meantime i'll include your patch in our rpm, so should be in
the next rawhide version and releases we make.
Read ya, Phil