It's all about the answers!

Ask a question

How to lock a folder in a component


qiu saphen (27126039) | asked Sep 01 '11, 4:25 a.m.
edited Oct 06 '17, 12:04 a.m. by David Lafreniere (4.8k7)

Hi,
I want to lock a folder to avoid anyone checkin code into it, so how to do that? I find that I can lock a file only..

Accepted answer


permanent link
David Lafreniere (4.8k7) | answered Oct 06 '17, 12:04 a.m.
FORUM MODERATOR / JAZZ DEVELOPER

As of RTC 6.0.5 there is still no way to lock a folder (such that all child files will be locked).
As mentioned in the other answers, these requests are tracked here:
Read and write permissions at the folder level. (63844)
Provide write permission at the versioned item granularity (171106)


In case this forum question may be of interest to others, here are some other ways currently to have multiple files locked in batch:


Locking the Entire Stream or Component:


In RTC 6.0.2 we added a feature that lets you lock streams and components to prevent deliveries to the files in those streams or components. Stream and component locks work in a similar manner to file locks but apply to the entire stream or the entire component in a stream. When a stream or component is locked, any attempted deliveries by users who do not own the lock will fail with an appropriate error message. The user that holds the lock can still perform deliveries to the stream. A lock does not only prevent deliveries, it also prevents any operation that affects the files in the locked component or stream. For example, a component replace is also prevented.

See:
-New & Noteworthy Mention: https://jazz.net/downloads/rational-team-concert/releases/6.0.2?p=newsDetails#stream-locking
-Stream/Component Locking Demo Video: https://www.youtube.com/watch?v=b8QwzwUF2ZY
-SCM Command Line Client 'set lock' command: https://www.ibm.com/support/knowledgecenter/SSCP65_6.0.4/com.ibm.team.scm.doc/topics/set_lock.html

Prior to 6.0.2, one approach might be to add a deliver advisor in the process spec to restrict deliveries to particular streams. By protecting your stream by particular roles or users, you can effectively lock the stream down.
"http://jazz.net/library/article/215#protect_some" describes how to protect individual components in a stream, the same approach can be used to lock down the entire stream.


Using the CLI (could write a custom script to automate this)
You could use the scm commandline which allows you to specify multiple files... 'scm lock acquire -r <repo> -s <stream identifier> -R'
To get the list of files in a component you could use the following command... 'scm list remotefiles -r <repo> <stream identifier> <component identifier>'
To get an output that is consumable you could use the --json option.


Multi-selection in the Rich Clients (Eclipse/Visual Studio)
You can multi-select files in the Package Explorer or the Repository Files view and use the Lock context menu action action. There is no way to select a folder however, and have it recursively lock all child files.

Michael Valenta selected this answer as the correct answer

3 other answers




permanent link
Geoffrey Clemm (30.1k33035) | answered Sep 02 '11, 12:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Oct 05 '17, 11:57 p.m. by David Lafreniere (4.8k7)

Probably work item 171106 is the best work item for this particular request.

Cheers,
Geoff


Comments
Vanessa Foster-Dotson commented Sep 30 '14, 1:50 p.m.

Was this funtionality ever added?  Are you now able to lock/unlock or show history on folders and subfolders?


Remy Suen commented Sep 30 '14, 2:15 p.m.

No, Vanessa. Those features have not been implemented in Jazz SCM.


permanent link
Karthik Krishnan (8899123165) | answered Oct 06 '17, 8:08 a.m.

 Alternatively, you can provide access to folder to specific people or team or access groups.

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.