The clearcase plugin requires the IntelliJ? eap #666 or above.
The plugin handles add,delete,rename and move properly in clearcase:
- add: Check out parent directory and add the file to cc. Leave both parent dir and file checked out
- delete: Checkout parent directory and remove the file. Leave parent checked out
- rename: Checkout parent and rename file in cc
- move: Checkout both old and new parent. Move file in cc
- Open Project Properties/Local VCS
- Enable Local VCS
- Have 1 day worth of history (optional, keep it smaller)
- Click on Apply
- Open Project Properties/VCS Support
- Select Clearcase in the VCS Support drop down
- Select NativeClearCase implementation for WinX? and CommandLineClearCase? for Unix/Mac
- Enter the new work root
- Select whether or not to use reserved checkout
- Uncheck the next option if you want to have IDEA pick up changes made outside, in the Check In Project.
- Click on OK
- From the menu, select Tools/Clearcase/Mark Project as Current.
Warning: if you do not have a working clearcase installation or if you are not on Windows OS do not select Clearcase native implementation.
Warning: if all files in the project window are brown you did not Mark the Project as Current
- If you modify a file within IDEA and then modify it outside (like merging), it will not be included in the Check In Project: FIXED Turn off the option to have external changes be uptodate in IDEA
- Files checked out but not modified are not unchecked out automatically as part of Project Check In.
- Check In Project will abort if optimistic locking is used and somebody has checked in changes concurrently to you. Need a nicer way to handle merging (there is feature for that)
- A new menu Clearcase should appear (you might have 2 menus if you have kept the clearcase.xml in the config directory)
- Use the
Mark Project as Current after every complete Clearcase update to let IDEA knows to track changes from now.
- Use
Check out to checkout files or just try to edit them and you will be prompted automatically to check them out.
- When you are finished working, Use
Check in Project (Ctrl+k) to check in all your changes in an atomic way. This includes:
- Added files,
- Delete files,
- Renamed/Move files,
- Check in changed files.
You do not need to check in/add/delete/rename/move individual files.
- When refactoring modifies multiple read-only files you can check out all files at once:
- turn on the preview option
- read-only files will appears in red in the preview
- right click on the top level node and select checkout in order to checkout all files of the node simultaneously.
The commands issued when checking in the project are logged to the console window. So take a look sometimes and after every Check in Project to make sure.
See VcsIntegrations for more info on how the IDEA VCS API works
Due to speed issues with clearcase (let's face it, I do not believe there is a slower VCS in the Universe) the plugin does not query clearcase but uses IDEA internal state instead to determine if an action is enable or not. This can be rather surprising since for example if you "Check out" a file but do not modify it (the file name is still black in the editor tab) the "Check out" menu is still enable. This is because IDEA only consider a change if there is a real content difference. In this case the file is now writable but its content has not changed.
Here is the run down of when the actions are available:
- Check out/Hijack file: Unmodified file (file name is black)
- Check in file: Modified file (file name is blue)
- Undo check out file: Modified file (file name is blue)
- Add file: Created file or directory (file name is green or directory is black or green)
- Update file: Always
Several log4j Categories are available to get information on the workings of the plugins:
- net.sourceforge.transparent.TransparentVcs: plugin api trace
- net.sourceforge.transparent.ClearCase: clearcase calls trace
- net.sourceforge.transparent.actions.VcsAction: plugin actions trace
- net.sourceforge.transparent.CommandLineClearCase: cli command trace
Modify IDEA_DIR/bin/log.xml to insert the following tags just before the <root> node:
- This turns everything on
<category name="net.sourceforge.transparent">
<priority value="DEBUG"/>
<appender-ref ref="CONSOLE-DEBUG"/>
<appender-ref ref="FILE"/>
</category>
- This turns only the plugin actions trace
<category name="net.sourceforge.transparent.actions.VcsAction">
<priority value="DEBUG"/>
<appender-ref ref="CONSOLE-DEBUG"/>
<appender-ref ref="FILE"/>
</category>
The FILE appender will output the trace to the system log file located at $SYSTEM_DIR$/log/idea.log. $SYSTEM_DIR$ is on Win32 at C:\Documents and Settings\#USER_NAME#\.IntelliJIdea\system
|
|