1

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?

Stelios Adamantidis
  • 1,866
  • 21
  • 36

1 Answers1

0

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.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • You are the savior for those very few of us doomed to use clearcase. Branch is brand new, although I've made a merge (and checked the files in) from another branch. What I don't understand is what `this instance` refers to if you could explain. I have removed the branch from the CC explorer so I can't test immediately. Your record though in similar questions does not leave me any doubts. – Stelios Adamantidis Jan 24 '18 at 17:43
  • @SteliosAdamantidis Sorry for the delay. I have edited my answer accordingly, to explain why an "instance" is when it comes to a branch type. – VonC Jan 24 '18 at 21:48
  • What delay? ;) Thanks, I understand now. (Well I _think_, it's clearcase after all, I can never be sure :D ) – Stelios Adamantidis Jan 25 '18 at 09:13
  • @SteliosAdamantidis Yes, a brtype is the template from which a branch is created. Once that branch is created, it is an instance of the brtype. – VonC Jan 25 '18 at 09:15