Clearcase:检出和修改但禁止检入 [英] Clearcase: checkout and modify but forbid checkin

查看:151
本文介绍了Clearcase:检出和修改但禁止检入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以用大写字母签出文件以进行修改,从而无法将其重新签入?我将要在私有分支上入侵某些文件,只有其中一些我想签入。我想消除意外签入不需要的更改的可能性。 (我知道我们可以编写一个触发器来检查签出注释中的魔术关键字;我正在寻找CC内置的东西。)

Is it possible in clearcase to checkout a file for modification such that it is impossible to check it back in? I’m going to be hacking some files on a private branch, only some of which I want to ever check in. I want to eliminate the possibility of accidentally checking in unwanted changes. (I know we can write a trigger to check for magic keywords in the checkout comment; I'm look for something built-in to CC.)

推荐答案

在ClearCase术语中拼写为 Hacking some files:在快照视图中被劫持的文件

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

要做的是:


  • 锁定这些文件(除了少数您可能会检出/检入文件的开发人员以外, cleartool lock -nusers userA,userB,... aFile

  • 创建快照视图

  • 更改读/写权限(在OS级别上,与这里的ClearCase无关)

  • 直接修改它们(不先检出它们,因此处于劫持状态)
  • $ b

OP Kevin Little 在评论中添加:


A,我们只使用动态视图

Alas, we only use dynamic views

很容易:

在ClearCase语言中,拼写黑客有文件:在动态视图中使文件黯淡

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

所有您需要做的是:


  • 锁定这些文件(少数文件除外)您知道的开发人员很可能检出/检入文件: cleartool lock -nusers userA,userB,... aFile

  • 创建动态视图

  • 将需要修改的文件复制为aFile.tmp

  • 修改配置规范以不选择它们

  • 将其复制回其原始名称(由于私有版本将其正式版本覆盖,它们被遮盖了)

  • 从配置规范中删除无选择规则

  • 直接修改它们

  • 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

要不选择它们,请添加到配置规范( ct edcs 在其他规则之前

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.

这篇关于Clearcase:检出和修改但禁止检入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆