2

I have a large number of files that I am trying to check in. This process needs to be done several times and is time and resource consuming. I am using the follow command to do this:

cleartool lsco -cvi -all -s | awk '{print "cleartool ci -c \"<Name of checkin>\" " <path to vob> | sh

This command does work, but it takes a very long time to run, as each file is checked in individually. Is it possible to checkin all files at once, or perhaps a faster method of checkin in the files individually. Is it possible to use the same concept, but for a mass checkout?

Alex Weber
  • 450
  • 2
  • 16
  • @VonC indeed. I've done some research and it seems that the clearfsimport command might have a more repo approach. I am currently trying to figure out the best usage for it. – Alex Weber Jan 10 '17 at 15:41
  • @VonC, just to make sure I understand, in order to use clearfsimport I need both a snapshot view and dynamic view with the same config spec? When I use the command, it copies the files from the source to the destination, checks the files out, and then checks them in? Thanks for the help. – Alex Weber Jan 10 '17 at 15:50
  • @VonC Can I also use clearfsimport to create new versions of files? For example, if I have a set of 10 files, modify all of them outside of my vob, and then use clearfsimport (source being the directory that I modified the 10 files, destination being the location of the same set in the VOB) to create new versions? – Alex Weber Jan 10 '17 at 15:58
  • @VonC One final question, if the source deletes a file that is currently in the destination, can clearfsimport account for that by removing the file element in the destination? Thanks for the help. If you write an answer, I can mark it as answering my question! – Alex Weber Jan 10 '17 at 16:05

1 Answers1

2

As I mentioned in "What are the basic clearcase concepts every developer should know?", ClearCase remains a file-by-file VCS, meaning each operation (checkout; checkin, merge) is done file by file.

clearfsimport remains one possible "bulk" operation (even though behind the scene, it will still checkout or mkelem for new files, copy, and checkin the files one by one)

That means you can use one view as source folder (clearfsimport will import any folder, ClearCase view or not), and a snapshot view with the same config spec as destination. See "ClearCase, use clearfsimport to perform brute force update" and "How can I use ClearCase to “add to source control …” recursively?".
With the -rmane option, it will even remove files which are no longer present in the source folder. See "Remove unused source code files".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks again for all your help. I've tested the command and it is working perfectly for my purpose. I'd hate to be a bother but I figured it would be worth it to ask. Is there an option to force the command to stop before checking in, this way it leaves all the elements checkedout (so that I can do a merge)? – Alex Weber Jan 10 '17 at 19:00
  • @AlexWeber Apparently no: https://www.ibm.com/developerworks/community/forums/html/topic?id=77777777-0000-0000-0000-000014961422. My suggestion: http://stackoverflow.com/a/19348797/6309 – VonC Jan 10 '17 at 19:30