About converting view-private files to elements using mkelem

You can use the mkelem command to convert a view-private file to a file element with the same name. There are several cases:

  • By default, mkelem creates an empty version 0 of the new element, then checks out the new element to your view. The view-private file becomes the checked-out version of the new element.
  • If you use the -ci option (check in), mkelem does all of the above, then proceeds to check in version 1 of the new element. Thus, version 1 has the contents of the view-private file. With -ptime, mkelem preserves the modification time of the file being checked in.
  • If you use the -nco option (no check out), mkelem creates an empty version 0 of the new element.

During the element-creation process, the view-private file is renamed to prevent a name collision that would affect other HCL VersionVault tools (for example, triggers on the mkelem operation). If this renaming fails, you see a warning message. There are two renaming procedures:

  • If a new element is checked out, mkelem temporarily renames the view-private file, using a .mkelem (or possibly, .mkelem.n) suffix. After the new element is created and checked out, mkelem restores the original name. This action produces the intended effect: the data formerly in a view-private file is now accessible through an element with the same name.
  • If no checkout is performed on the new element, mkelem alerts you that the view-private file has been renamed, using a .keep (or possibly, .keep.n) extension. However, the view-private file is not converted to an element; it is moved out of the way to allow creation of an element in its place.
    Tip: If mkelem does not complete correctly, your view-private file may be left under the .mkelem file name.