Clearcase: checkout and modify but forbid checkin

半腔热情 提交于 2019-11-27 16:27:37
VonC

"Hacking some files" is spelled in ClearCase lingo: hijacked files in a snapshot view.

All you have to do is to:

  • lock those files (except for the few developers you know are likely to checkout/checkin the files: cleartool lock -nusers userA,userB,... aFile)
  • create a snapshot view
  • change the read/write right (at the OS level, nothing to do with ClearCase here)
  • modify them directly (without checkout them first, hence the "hijacked" state)

The OP Kevin Little adds in the comment:

Alas, we only use dynamic views

Easy enough:

"Hacking some files" is also spelled in ClearCase lingo: eclipsed files in a dynamic view.

All you have to do is to:

  • lock those files (except for the few developers you know are likely to checkout/checkin the files: cleartool lock -nusers userA,userB,... aFile)
  • create a dynamic view
  • copy the files you need to modify as aFile.tmp
  • modify the config spec to not select them
  • copy them back to their original name (they became "eclipsed" as their private version override their official versioned counterpart)
  • remove the "none" selection rules from the config spec
  • modify them directly

To not select them, add to the config spec (ct edcs) before the other rules:

element /a/path/to/aFile1 -none
element /a/path/to/aFile2 -none
...

To restore them, all you have to do is move or remove those files.
They will be dynamically be replaced by their original and still versioned element.

I don't know about the administration. From a user standpoint, you could have 2 views. In one view, checkout the files you don't want to check in. In the other view (your view), check them out unreserved. Then, if you try to check them in, you'll get an error because they're checked out to the other view.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!