How to add all the files in a folder to source control via cleartool command?

Samselvaprabu picture Samselvaprabu · Oct 15, 2012 · Viewed 10.3k times · Source

I am having a folder where lot of files and subfolders , adding it to source control via UI is consuming much time.

How to add all the files (including files inside subfolder) to source control using cleartool?

(I am using clearcase UCM)

Answer

VonC picture VonC · Oct 15, 2012

As mentioned in "How can I use ClearCase to “add to source control …” recursively?", clearfsimport is the way to go.

However, clearfsimport will take a source an import it in your view, so:

  • it is best to keep the source outside your view (to avoid confusion when ClearCase tries to add the source file in the destination which is the same directory)
  • you must "clean out" the source directories first (because the clearfsimport command will import... all the files under the root directory you mention)

See "Creating a new subdirectory structure in ClearCase?" as an example: you can preview the result of an import first.