1

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?

Palace Chan
  • 8,845
  • 11
  • 41
  • 93

1 Answers1

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).

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Yes this looks exactly like what I want. Much to my chagrin though It's giving me a "No permission to perform operation "remove element"." error saying I have to be element owner, VOB owner, or root...confused because this is my branch and i created this file back in the day in that old branch and ct mkelem-ed it! – Palace Chan Jan 07 '13 at 15:20
  • @PalaceChan it is best, then, to forward the request to your ClearCase admin, who can force the delete. – VonC Jan 07 '13 at 15:22
  • Thanks, will have to do that. – Palace Chan Jan 07 '13 at 15:58