1

I am attempting to check in hundreds of new files in Base ClearCase. Due to network and server issues, I am wanting to write a batch script of cleartool commands to add each file to source control. All files will be checked in under a single ClearQuest task.

I have tried selecting all the files and adding all at once via the context menu, but after selecting the ClearQuest task association and choosing "apply to all", I am still having a dialog box pop up for every file, asking me to confirm the association.

I want to write a list of commands like:

cleartool mkelem -c "SCR ... / TASK ... - blah blah" filename.ext

However, I don't know how to associate the change with the TASK, and I don't see any documentation for doing this in Base CC/CQ.

Casey Kuball
  • 7,717
  • 5
  • 38
  • 70

1 Answers1

1

First, don't write a script adding new files throug mkelem: if you can isolate those files in their own folder (or tree of folders) outside a view, then you can import them into a view (snapshot or dynamic) through clearfsimport.

clearfsimport is made for that, and will checkout the parent folder of the files to add, and do the required mkelem for each file for you.

See also "How can I use ClearCase to “add to source control …” recursively?"":

clearfsimport -preview -rec -nset c:\sourceDir\* m:\MyView\MyVob\MyDestinationDirectory

You will need first to use cleartool settask in order to set the ClearQuest task for the destination view used for this import.
See "How to configure base ClearCase to use the Change Management integration with ClearQuest".

As the OP Darthfett adds in the comments:

However, as I am using ClearCase 7.*, there is no settask command.
As a workaround, it looks like using set CQCC_AUTO_ASSOCIATE=<TASK ID> will work (see here)

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • This looks like the right answer -- using cleartool settask. However, as I am using ClearCase 7.*, there is no settask command. As a workaround, it looks like using `set CQCC_AUTO_ASSOCIATE=` will work (see [here](http://www.ibm.com/support/knowledgecenter/SSSH27_7.1.1/com.ibm.rational.clearcase.cc_proj.doc/c_bcccq_autoassoc_usng.htm)). Thanks for the help! – Casey Kuball Sep 14 '16 at 20:27
  • @Darthfett No problem, and well spotted for the settask workaround. I have included your comment in the answer for more visibility. – VonC Sep 14 '16 at 20:37