开发者

what is the echo command in clearcase?

I have a question about clearcase, someone helped me on some issue in clearcase, he used a command as follow: echo " " > xxx.log and

cleartool co -nc filename 

what does this 开发者_StackOverflow中文版mean?


When you have a file which is "checkedout but removed", as described in ct ls:

The element was checked out in this view, but the view-private file was subsequently removed.
You may have deleted the file.

A solution to restore that file is to checkout it again, but if you do that directly, ClearCase would complain about being unable to access said file (because it isn't physically there anymore).

Hence the:

 echo " " > afile

You need to have some content in that file in order to make a cleartool command on it.
So even if its content is a bogus one, it at least allows you to proceed.

Then, you can checkout it again (-nc means without comment, but it also means "takes the previous comments used on the current checked out version)

 cleartool checkout -nc afile

Another way to restore it is to uncheckout the file:

 cleartool unco afile

That will also restore its content.


The first command writes a space to xxx.log; echo is a shell command and has nothing to do with clearcase. The second command checks out filename without comments. These two commands seem to be pretty unrelated, unless there something else you haven't told us.


Just a tip: 'echo' might to used to clear xxx.log file.

co - stands for check out filename, nc - stands for no comments

Might be helpful: http://www.yolinux.com/TUTORIALS/ClearcaseCommands.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜