ClearCase新增文件

原文地址:http://blog.csdn.net/ace_fei/article/details/7531376

大家应该都知道在clearcase上新增文件是通过以下过程来生成的:

cleartool co -nc .

cleartool mkelem -nc -nco new_file

cleartool ci -nc .

但是如果你在自己的开发分支上做以上操作就可能报错。

$ct mkelem -nc newfile
Created element "newfile" (type "compressed_file").
cleartool: Error: Unable to check out "newfile".

这是因为,新增文件需要先在/main/0创建,然后才拉到你的开发分支。

比如,现在有一段config-spec:

element /vobs/server/yourpath/...  offical_label      -nocheckout

如果我们需要在自己的branch上开发,就应该修改为:

element /vobs/server/yourpath/...  .../YourDevBranch/LATEST
element /vobs/server/yourpath/...  offical_label      -mkbranch  YourDevBranch
element /vobs/server/yourpath/...  /main/LATEST    -mkbranch  YourDevBranch   

如果没有最后一句,正常的co,ci是没有问题的,但是我们新增文件时就会出现以上的cleartool: Error。

原文地址:https://www.cnblogs.com/nanqiang/p/8032727.html