|
ClearCase tools
[Back]
This file, clearcase.nm,
contains macros for performing check-in, check-out, and uncheck-out.
You'll need to add entries to the macro menu. Use
and add calls to the macro functions the standard way. After saving
the defaults, my .nedit file contains the following lines:
ClearCase>checkin:Shift+Alt+Grave::: {\n\
CC_Checkin()\n\
}\n\
ClearCase>checkout:Alt+Grave::: {\n\
CC_Checkout()\n\
}\n\
ClearCase>uncheckout:::: {\n\
CC_Uncheckout()\n\
}\n\
The system has one problem. At check-out one normally enters a check-out
comment. At check-in one wants to reuse it, but change it slightly. My macros
extract the check-out comment, and present it at check-in, but you must
either accept it as is or enter a totally new comment.
A string_dialog() where one can supply default text would be
nice. I have tried using an xterm for the check-in, but it slows down
the process quite a lot, so I settled with the present approach.
Alternatively, here's a few shell commands for ClearCase, add this to
.nedit:
ClearCase Tools>Checkout File::C:DL:\n\
cleartool co -unr -nc %\n\
ClearCase Tools>Checkin File (No Comment)::i:DSL:\n\
cleartool ci -nc %\n\
ClearCase Tools>Revert Changes::R:DL:\n\
cleartool unco -rm %\n\
ClearCase Tools>Show Changes:::W:\n\
cleartool diff -ser -pred %\n\
ClearCase Tools>Show Changes Graphically:Ctrl+Alt+D:G:D:\n\
(cleartool diff -g -pred % &) >& /dev/null\n\
ClearCase Tools>List Checkedout Files:::D:\n\
cleartool lsco | grep $USER | gawk '{ print $5 " " $6 " " $7 " " $8}'\n\
ClearCase Tools>List All Checkedout Files:Ctrl+Alt+L:L:D:\n\
cleartool lsco -cview -avobs | gawk '{ print $5 " " $6 " " $7 " " $8}'\n\
ClearCase Tools>Show Version Tree:Ctrl+Alt+T:T:D:\n\
(cleartool xlsvtree % &) >& /dev/null\n\
ClearCase Tools>Show File History:Ctrl+Alt+H:H:W:\n\
cleartool lshistory %\n\
ClearCase Tools>Show View:Ctrl+Alt+V:V:D:\n\
cleartool pwv\n
And this will run find on a specified directory:
directory = string_dialog("Search from what directory?","Ok","Cancel")
if ( $string_dialog_button == 2 || $string_dialog_button == 2 ||
directory == "" )
return
string = string_dialog("Search For...","FixID","PR","Cancel")
if ( $string_dialog_button == 1 )
answer = shell_command("/usr/atria/bin/cleartool find " directory " -element 'attr_sub(FixID,==,\"" string "\")' -print", "")
else if ( $string_dialog_button == 2 )
answer = shell_command("/usr/atria/bin/cleartool find " directory " -element 'attr_sub(PR,==,\"" string "\")' -print", "")
else
return
if ( $shell_cmd_status != 0 )
{
dialog("Error executing: " answer,"Ok")
return
}
dialog("/usr/atria/bin/cleartool " "find " directory " -element 'attr_sub(FixID,==,\"" string "\")' -print\n\n" answer,"Ok")
To show the output in a new window see this macro, Show
result of shell command in a new window.
[Back]
Released on Wed, 21 Nov 2001
by
C. Denat
|
|