How to delete a clearcase branch with a single command?

若如初见. 提交于 2019-12-08 07:40:58

问题


I've accidentally created a branch with the wrong config spec and I've made a merge in there that wasn't meant to be done. Is there a way to remove this branch like it never existed, with one and only command? There are no checked-out files in the branch.

I could go through all files and do it manually since there are only 3 files that were merged. But what if there were 3000 instead of 3?


回答1:


You can try and delete the byrtpe (branch type) with cleartool rmtype brtype:xxx.

That is possible only if you are talking about a brand new branch, which was used only in this instance (that is, where you need to delete all instances of that branch type: an instance of a branch type is a branch created to reference a version at a checkin).

Then (if the only versions in that branches are the wrong merged ones), you could do:

cleartool rmtype -rmall brtype:yourBranch@\avob

Again, that is a dangerous command, and should only be used for a new branch with a few versions.

The -rmall will first remove all branch type instances (ie the actual branches, and their associated versions and labels).
Then the branch type itself will be removed.



来源:https://stackoverflow.com/questions/48426170/how-to-delete-a-clearcase-branch-with-a-single-command

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