Bug 107947 - Need ability to enforce locks for the same user
Summary: Need ability to enforce locks for the same user
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: rcs
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-10-24 20:01 UTC by James Olin Oden
Modified: 2015-03-05 01:12 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-02-04 15:15:57 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Adds -S to co to allow for obeying of locks for the same user. (3.71 KB, patch)
2003-10-24 20:05 UTC, James Olin Oden
no flags Details | Diff

Description James Olin Oden 2003-10-24 20:01:25 UTC
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 
functionality.

Version-Release number of selected component (if applicable):
5.7

How reproducible:
N/A

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.  
    
Actual results:
It checks it out twice, furthermore  any changes made to the file after
the first check out and before the second will be lost.


Expected results:
I expected these results (its an RFE (-;).

Additional info:
I am also working this through GNU help-rcs list.  Will attach links to the
conversation when they are available on the archive.

Comment 1 James Olin Oden 2003-10-24 20:05:02 UTC
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.

Comment 2 Phil Knirsch 2004-02-04 15:15:09 UTC
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.

Thanks,

Read ya, Phil


Note You need to log in before you can comment on or make changes to this bug.