This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 20708

Summary: Clearcase profile can't Add directories to source control
Product: obsolete Reporter: ats37 <ats37>
Component: vcsgenericAssignee: Martin Entlicher <mentlicher>
Status: VERIFIED FIXED    
Severity: blocker    
Priority: P3    
Version: 3.x   
Hardware: PC   
OS: Windows 3.1/NT   
Issue Type: DEFECT Exception Reporter:
Attachments: IDEA configuration file for Clearcase

Description ats37 2002-02-20 09:50:44 UTC
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 
messy.

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 
instead?
Comment 1 Martin Entlicher 2002-02-20 12:24:52 UTC
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
it.
Comment 2 ats37 2002-02-20 13:17:37 UTC
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]
/reserve [/noprogress]
/unreserve [/noprogress]
/mount
/unmount
/startview
/stopview
/viewprop
/removeview
/diffother
/diffpred
/options

which would be followed by the filename, I guess.  clearvtree has 
usage instructions:
clearvtree [-all] [-nmerge] [-nco] [-skeletal] pname ...
alternatively, there's
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 
commands don't.

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).
Comment 3 Martin Entlicher 2002-02-20 15:16:23 UTC
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,
etc.
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.
Thanks.

Comment 4 ats37 2002-02-21 13:32:40 UTC
Created attachment 4772 [details]
IDEA configuration file for Clearcase
Comment 5 ats37 2002-02-21 13:56:40 UTC
>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,
>etc.

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).
Comment 6 Marek Grummich 2002-07-22 11:57:47 UTC
Set target milestone to TBD
Comment 7 Martin Entlicher 2002-07-29 19:13:20 UTC
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
http://vcsgeneric.netbeans.org/profiles/index.html
Comment 8 Jiri Kovalsky 2002-08-05 15:45:56 UTC
And could you verify also this one, if you would be so glad ? Thanks
Andy !
Comment 9 ats37 2002-08-08 17:20:25 UTC
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).
Comment 10 Jiri Kovalsky 2002-08-09 09:41:12 UTC
Martin, can you comment on this ?
Comment 11 Jiri Kovalsky 2002-11-14 13:06:27 UTC
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.