Jazz Source Control Pessimistic locking doesn't work?
Hi,
i've installed version 5.0.2, because i want to use the new perssimistic locking feature.
We have one stream and serveral workspaces.
The stream should lock the following filetypes:
.rpgle, .rpg, .pf, .lf, .prtf, .dspf, .clle, .cl
I have done these entries in the new provided text area and saved it.
Now if i open a rpgle file from my workspace, and my colleague opens the same file from his own workspace.
Shouldn't I get now a dialog box with lock read only?
Or how does that feature work?
Accepted answer
Editing in Eclipse
Most Eclipse editor use Eclipse Team API functions to signal that an edit is beginning allowing the current SCM system to intervene, with RTC that means that as soon as the first change is detected then for these automatically locked file types the user will be prompted to lock the file.
Note this means that if no changes are made then the file is not locked by RTC and the file is left as read-only on disk. To initiate the locking procedure a change must be made.
(Note, as mentioned by Shashikant, there are non-conformant editors that may appear in Eclipse but not correctly invoke the Team API, in this case treat the file as if it was edited externally.)
Editing with non-Eclipse Applications
Since non-Eclipse editors have no way to interact with the Team API users must manually lock the "automatically locked" files they wish to edit externally. If the user does not manually initiate the lock then the file is left as read-only through the file system. This means that users will be able to make changes in external applications but unable to save them until a lock is initiated.
2 other answers
Comments
Hello Ralph,
thanks for your answer.
yes i checked that link before.
I am on RDi version 9.0.1 and added the file patterns like above.
I am using the iProjects perspective for editing and compiling my files.
When I edit a file for the first time in the Eclipse client, I should get prompted to acquire the lock on that file, but there is no dialog ???
The preferences for auto-locking can you see here.
Couple of questions:
Hi,
1) yes i loaded the workspace several times after setting the pattern.
2) No, the files can be edited and saved.
Do you know the settings for special processing?
3) yes i can save and edit the file, but it doesn't bring up the dialog.
Comments
>>This suggests that the pattern did not get applied/processed during the load. Is the stream the default flow target?
Yes it is the default target.
>> Another thing to try out is to change the file attributes to read only manually and then try editing or saving the file. This should show the dialog. This is not a solution but to confirm that the dialog shows up.
Now i found a scenario, when the dialog shows up.
When i opened a RPGLE file, then set the file attribute manually to read only and then edit and save the file, the dialog shows up.
When i set this file to read only before opening it, i am in browse mode and can't change anything.
Do you know that problem?
I am not sure what do you mean by browse mode. Did you mean you cannot open it inside of Eclipse?
I can't edit anything, when i set the file manualy to read only before open it.
It makes no difference with other extensions .rpg, .pf, .lf, .prtf, .dspf, .clle, .cl, .jsp
I am wondering when RDi is opening the file and if it is a read-only file it disables editing and puts it in browse mode. If the app controls that then this feature cannot work.
i've tested it now with the RTC eclipse client. The files are now automatically read-only if the pattern matched, but i cannot edit the files because it is also in only in browse mode.
I've done a screencast to show the problem:
https://www.screenr.com/AAuN
Thanks. As mentioned earlier since the RDi editor is a custom editor it may not be calling the expected FileModificationValidator extension. Not sure if there is a workaround as I am not familiar with RDi.