Jazz Source Control Pessimistic locking doesn't work?
Klaus Kirnbauer (11●1●1)
| asked Jan 12 '15, 6:08 a.m.
edited Oct 10 '17, 11:22 a.m. by David Lafreniere (4.8k●7) Hi,
|
Accepted answer
It's important that users understand the supported workflow, and there's two basic cases:
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. David Lafreniere selected this answer as the correct answer
|
2 other answers
Ralph Schoon (63.5k●3●36●46)
| answered Jan 12 '15, 7:09 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
Have you looked at https://jazz.net/downloads/rational-team-concert/releases/5.0.2?p=news#pessimisticLocking ?
Comments Hello Ralph,
Couple of questions:
1) Did you load the workspace after setting the pattern?
2) Did those files load as read-only files? Check the file system attributes.
Usually when you edit the file in Eclipse it sends an edit/modified event. I am not sure if this happens by default for any kind of app or the app has to do some special processing.
3) Can you edit and save the file? I believe the save should trigger the read-only/save event and if so it should bring up that dialog.
Hi,
|
>>> No, the files can be edited and saved.
This suggests that the pattern did not get applied/processed during the load. Is the stream the default flow target? The current design only works when the stream is the default flow 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.
Comments
I am not sure what do you mean by browse mode. Did you mean you cannot open it inside of Eclipse?
I am not sure why .rpgle file is not set to read-only. What about other extensions such as .rpg, .pf, .lf, .prtf, .dspf, .clle, *.cl? Are any of those files loaded as read-only? By the way, I am assuming you are not reloading but loading into a new sandbox on every load.
I can't edit anything, when i set the file manualy to read only before open it.
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.
By the way, not setting the file to read-only during load is a defect. Please raise a defect.
Klaus Kirnbauer
commented Jan 14 '15, 3:07 a.m.
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:
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.
showing 5 of 7
show 2 more comments
|
Your answer
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.