1

I have a question regarding ClearCase. From the documentation of the mkelem command I read:

The mkelem command creates one or more new elements. By default, a new element can be created in a directory only if that directory element is checked out. mkelem appends an appropriate line to the directory's checkout comment.

Why is this the case? And, as it says by default, how do I change this default option? I couldn't find anything about this in the doc.

PKlumpp
  • 4,913
  • 8
  • 36
  • 64

1 Answers1

3

It is the case because the element to be created needs to be registered in the list of elements maintained by the parent folder.

Since that list is about to change (because you are adding a new element), the parent folder needs to be checked out in order for its list to evolve.
Then a check in will record that changes (if you undo checkout the parent folder, then the element added to source control would end up in the vob/lost+found folder, as it wouldn't be referenced by any directory version)

Note that if you have many element to add to source control (many mkelem to make, meaning potentially many parent folders to check out), you can still use clearfsimport instead, as I explain in "how to run mkelem command in command prompt" or "How to add a directory tree to a ClearCase repository?"

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250