How can I bypass a clearcase “file already exists” error?

纵然是瞬间 提交于 2019-12-08 05:14:11

问题


I try to add a file in a branch to source control by doing this:

ct mkelem -ci -nc

and I get this error:

File already exists in "other_branch" branch.

Resolution: Since this file already exisit in ClearCase you will have to, selectively, merge this file from other_branch branch to your current branch/view.

Well, other_branch is completely obsolete and I would like to use the current branch file im trying to merge 100% as is. Is there a way to communicate this to clearcase on the commandline? Like ct mkelem -force (or -replaceAnyOtherFileWithThisName) -ci -nc?


回答1:


There is not many solutions, beside removing completely that element (which can be dangerous in general, except in your case, this is about an obsolete branch).

cleartool rmelem

But a "safer" route would be to try an merge that obsolete branch, ignoring all changes except the addition of that file.
That way, you don't have to 'mkelem' the same file again, you can reuse the one existing (and changing its content completely).



来源:https://stackoverflow.com/questions/14198130/how-can-i-bypass-a-clearcase-file-already-exists-error

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