It's all about the answers!

Ask a question

Lock new file in sandbox ?


Gidi Gal (962056) | asked Sep 26 '16, 2:38 a.m.
edited Sep 26 '16, 2:40 a.m.
Hello to the forum members,

I am working with Rational Team Concert (aka RTC)  6.0.2. I created new file in sandbox, refreshed the sandbox, selected the file and right-clicked on it. I was surprised to discover that Lock\Unlock menu options are available and that I am able to lock the file.

Is this a bug or expected behavior ? If I understand correctly, lock should prevent other users from delivering changes to the locked file in the stream. I thought that maybe RTC will prevent other users in such scenario from delivering a new file with the same name in the same location. It does not.

Thanks,
Gidi

Accepted answer


permanent link
David Lafreniere (4.8k7) | answered Oct 06 '17, 11:02 a.m.
FORUM MODERATOR / JAZZ DEVELOPER
edited Oct 10 '17, 11:03 a.m.

This is actually working as designed. The user can lock files that have not yet been delivered to the stream. This however will not prevent other users from creating a different file with the same name (in the same location), and thus conflicts / evil twin scenarios can still occur. One benefit might be that you may know you want to work on this file across several change sets, and so you may want to lock it right away so that you don't forget to do so later (you can even lock it before checking in the new file). Thus you can lock this un-delivered file, and then deliver this new file to the stream at some future point without worrying about remembering to lock it as soon as you delivered it. This also removes any small 'window' where someone else may quickly modify that file and deliver their change. Also, if you were to complete the change set which added the file, but did not yet deliver the change set to the stream, it is still possible for someone else to flow to your repository workspace and accept the change set addition, and make changes of their own and deliver that to the stream, but by having it locked right away, it would prevent the delivery by the other person in this case

Michael Valenta selected this answer as the correct answer

One other answer



permanent link
Lily Wang (4.9k714) | answered Sep 26 '16, 3:38 a.m.
 This is expected. After you lock the file, you could see the file is shown as locked with the information "Locked by me in <stream name> stream". So though you lock the file from the sandbox, the lock is actually happened for the repository file on the stream which your workspace is targeted. In that way other user could not deliver his change set which modifies the same file to the stream.
Please see https://jazz.net/help-dev/clm/index.jsp?topic=%2Fcom.ibm.team.scm.doc%2Ftopics%2Ft_scm_eclipse_file_auto_lock.html

Comments
Gidi Gal commented Sep 26 '16, 8:57 a.m.

Hi Lily,

Many thanks for your reply. My focus is on new file on the sandbox. There is no repository file for it yet, because I did not perform deliver or check-in. So, other users will have no indication that this file exist in the stream and because of that they will not see it is locked and the system will not block them from locking a file with the same name in the same location.

Thanks,
Gidi

Your answer


Register or to post 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.