In order to have an effective build environment we must check-in all the resources needed to build the project from scratch; this includes support libraries and support applications. For example one of my projects arrives as an installable deliverable, but in order to create it we need a Java compiler, Java source, property files, NSIS (A scriptable win32 installer/uninstaller system by Nullsoft), Doxygen (documentation generator), JUnit (unit tester) and a whole host of support libraries. So in order to truly build the project from scratch all these products need to be saved. Clearcase, while being an excellent source controller, leaves a lot to be desired when it comes to importing a directory structure into its control. So lets pretend that we have just finished off our testing and it’s check-in time. For the sake of space I’ll only show you how to check in one of the set of support applications, in this case JUnit. Our support software is located at:
Z:\java\libs\junit\latestI would like to import it into:
Z:\java\libs\junit\junit-4.7and then create a clearcase symbolic link called latest to point to
junit-4.7. This is a really handy way of testing new libraries without changing lots of aspects of your environment.
- Firstly find out what the name of the view is that you are going to import into. In my case “t2_6_14″.
- Open a command shell as the VOB owner using the command:
runas /user:research\ccadmin cmd
- You are now logged in as the VOB owner so your Z: drive (with the shell) is gone. You only have the K: drive which is used by the views directly.
- In the location where you want to do the import, create a folder with the same name as the folder you are importing e.g.
- Run the import command with full paths:
clearfsimport -recurse k:\t2_6_14\java\libs\junit\latest\* K:\t2_6_14\Quentin\ManagerLibs\junit\junit-4.7
- Hopefully, it should start chugging away.
- When it has finished delete the latest folder.
- Oddly the directory you created will be renamed to “junit-4.7.keep” and a new folder will be created by clearcase called “junit-4.7″, and this will contain the imported files. It is now safe to delete the unchecked-in “junit-4.7.keep”
- As a final touch we will create our symbolic link to join “junit-4.7″ to “latest".
- Checkout parent folder:
- Run the link command:
cleartool ln -s junit-4.7 latest
- Lastly, check in the junit folder.
No feedback yet
Form is loading...