I am unable to perform an Add to Source Control action on new (i.e. view local)
directories in a mounted Clearcase FS; the Output window displays an
error 'cleartool: Error: Can't create directory element because "com" already
exists.' However, when I try to execute the same command (as found in the
Execution String details on the Explorer Runtime tab) at a DOS prompt I get the
same error, so it's the command in the Clearcase profile that's the problem,
rather than Netbeans' execution of it.
From the help file, I see that directory elements should be created with the
command "cleartool mkelem -eltype directory <dirname>", or "cleartool mkdir
<dirname>" which is equivalent. However, this still won't work, as "You cannot
create a directory element with the same name as an existing view-private file
or directory, and you cannot use mkdir to convert an existing view-private
directory structure into directory and file elements." It is possible, using
the clearexport_ffile and clearimport commands in cleartool, but this is a bit
A colleague here has been using the IntelliJ IDE with Clearcase, with a 3rd
party configuration he found on a mailing list, and hasn't had these problems.
Examining the configuration file he uses, I see that it doesn't use the
cleartool command at all - it uses cleardlg.exe instead for Add, Checkin,
Checkout and Compare with Previous, and clearvtree.exe for the Version Tree.
Since cleardlg has options for most of the cleartool commands used for the
various vcsgeneric commands, but doesn't have any problem Adding directories,
perhaps the Netbeans profile should be changed to also use these commands
Unfortunately, I can not test it myself, because we currently do not
have ClearCase license, since ClearCase is not officially supported.
I did not find any help on cleardlg.exe. Does it popup it's own dialog
for command options? Do you know the difference from cleartool? If you
send me the desired execution string which will work, I can integrate
cleardlg /? gives a dialog box containing:
/addtosrc [/nocheckin] [/comment <string>] [/noprogress]
/checkin [/identical] [/comment <string>] [/noprogress]
/checkout [/reserved] [/unreserved] [/comment <string>] [/noprogress]
/uncheckout [/keep | /remove] [/noprogress]
which would be followed by the filename, I guess. clearvtree has
clearvtree [-all] [-nmerge] [-nco] [-skeletal] pname ...
cleartool lsvtree -graphical [-all] [-nmerge] [-nco] pname ...
which also calls up clearvtree.exe I see the profile's Compare with
Previous Version command is already using the -g option, which I
assume is equivalent to -graphical, but the Version Tree and History
Unfortunately, the checkin, checkout, uncheckout & mkelem commands in
cleartool don't have a -graphical option, so I guess cleardlg.exe
would have to be called directly for those.
If it would be useful, I could upload the 'cleartool help' output
and/or the IDEA configuration file I mentioned (so you can see what
commands it's using).
Is it necessary to change all commands to use cleardlg.exe? Why don't
we change just the Add command? It's still not clear to me in what
cleardlg differs from cleartool for commands like checkin, checkout,
I can see the help for cleartool, but if you can attach the IDEA
configuration file, I'll be glad to see how they do it.
Created attachment 4772 [details]
IDEA configuration file for Clearcase
>Is it necessary to change all commands to use cleardlg.exe? Why don't
>we change just the Add command? It's still not clear to me in what
>cleardlg differs from cleartool for commands like checkin, checkout,
Actually, I can't see any difference either for the other commands,
except that if they fail cleartool gives a better error message while
cleardlg just returns a statuscode of 1. So it's probably best to
leave checkin etc. as they are (apart from history & version tree, of
which I think the -graphical form is better).
Set target milestone to TBD
Thanks for the IDEA configuration file.
cleardlg /addtosrc ... is used to add files.
Also lshistory is executed with -graphical by default and clearvtree
is used instead of lsvtree.
This is fixed in the new clearcase-profile.nbm uploaded on the
additional profiles web page at
And could you verify also this one, if you would be so glad ? Thanks
Well, the Version Tree and History options open up their
graphical viewers okay, but also leave an empty "Output of
VCS Commands" window open on the screen; since there never
will be any output (it would be displayed in its own
window), I reckon the "Display Output" settings should be
switched to false for these commands.
Using Add To Source Control on a new folder, I got the
popup dialog to enter some comments, but when I clicked the
Okay button, in Netbeans I got the message
"Command Add To Source Control failed.
Check the full output of the command on the Runtime tab in
Explorer. The error output follows:
in the Output Window. The runtime tab showed No Output
Available, and the folder still displayed Local status.
However, when I did a Clearcase->Refresh on its parent
folder, the status changed to "\main\CHECKEDOUT from
\main\0", which was what I had been expecting (I'd left
the "Keep checked out" checkbox selected in the dialog).
It looks like it had worked just fine, but Netbeans had
mistakenly thought there had been an error. I assume if
there *had* been a genuine error, cleardlg would have told
me in a popup window anyway, so I guess it's safe enough to
just set the Do Not Warn of Failure setting to True. I
think the Refresh settings need changing too, as when I
tried that myself and added another folder, its status
still showed "Local" even after the Add had finished.
Refresh Current Folder is fine when it's files that are
being added, but when adding (sub)folders it seems to need
the Refresh Parent Folder option (plus, since it still
thinks it's failed even if we're ignoring that, Refresh
Even If Failed needs setting to 1).
Martin, can you comment on this ?
Well, since Andy didn't reopen the bug, I assume that he is satisfied
with current resolution. Verified in development build #200211140100
of NetBeans 4.0 instead of him.