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 167099 - ClearCase plugin does not work when build directory is separate from source directory which is accessed through a symlink.
Summary: ClearCase plugin does not work when build directory is separate from source d...
Status: REOPENED
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: ClearCase (show other bugs)
Version: 7.1.2
Hardware: PC Linux
: P2 blocker with 1 vote (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-15 13:16 UTC by paul_floyd
Modified: 2013-01-10 13:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Script to setup testcase in ClearCase (324 bytes, text/plain)
2009-06-18 21:04 UTC, paul_floyd
Details
try again (forgot to save file before uploading it) (335 bytes, text/plain)
2009-06-18 21:14 UTC, paul_floyd
Details

Note You need to log in before you can comment on or make changes to this bug.
Description paul_floyd 2009-06-15 13:16:01 UTC
With 6.7rc2

I can't get the ClearCase plugin to do anything. Our project directories have separate trees for source and objects; we 
build in the object directory that contains a soft link to the source directory. Imported projects only see the object 
directory in the ClearCase window. None of the clearcase actions are enabled for the source files. However, automatic 
checkout of files that are not checked out upon editing does work.
Comment 1 Thomas Preisler 2009-06-15 20:44:36 UTC
I just checked the version control support in C/C++ projects and everything seems to works OK. C/C++ projects supports
generic version control and it is up the version control plugin to provide the implementation. C/C++ projects are not
really aware of which VS system the project is under.

The problems you are seeing could be because of the soft links but not sure I fully understand your project structure.
Can you be a bit more specific? Perhaps create a test case that demonstrates the issue?
Comment 2 paul_floyd 2009-06-16 09:41:58 UTC
Here's a transcript manually setting up a testcase that has the same layout as our existing directories (which works 
with NB 6.5)

pfloyd> cd /vobs/adms/src
cairngorm:/vobs/adms/src

pfloyd> ct co -nc .
Checked out "." from version "/main/pfbranch/2".

cairngorm:/vobs/adms/src
pfloyd> ct mkdir -c test test
Changed protection on "/vobs/adms/src/test".
Created directory element "test".
Created branch "pfbranch" from "test" version "/main/0".
Checked out "test" from version "/main/pfbranch/0".
cairngorm:/vobs/adms/src

pfloyd> cd test
cairngorm:/vobs/adms/src/test

pfloyd> xemacs test.c Makefile&
cairngorm:/vobs/adms/src/test

pfloyd> ct mkelem -c test Makefile
Changed protection on "/vobs/adms/src/test/Makefile".
Created element "Makefile" (type "text_file").
Created branch "pfbranch" from "Makefile" version "/main/0".
Checked out "Makefile" from version "/main/pfbranch/0".
cairngorm:/vobs/adms/src/test

pfloyd> ct mkelem -c test test.c
Changed protection on "/vobs/adms/src/test/test.c".
Created element "test.c" (type "text_file").
Created branch "pfbranch" from "test.c" version "/main/0".
Checked out "test.c" from version "/main/pfbranch/0".
cairngorm:/vobs/adms/src/test

[note ss5-dbg is my build area, a "view private directory"

pfloyd> cd ../../ss5-dbg
cairngorm:/vobs/adms/ss5-dbg

[now make "shadows" of source and Makefile

pfloyd> mkdir test
cairngorm:/vobs/adms/ss5-dbg

pfloyd> cd test
cairngorm:/vobs/adms/ss5-dbg/test

pfloyd> ln -s Isrc/Makefile Makefile
cairngorm:/vobs/adms/ss5-dbg/test
pfloyd>

Next, in NB 6.7rc2

Add new project

Existing Makefile
/vobs/adms/ss5-dbg/test/Isrc

Then, if I right click on test.c, then click on the clearcase menu entry, it doesn't open.

Add new project in NB 6.5 works OK.
Comment 3 paul_floyd 2009-06-17 11:03:40 UTC
A couple more observations.

In NB65, if I open a file by double clicking on a compiler error/warning or from the Tasks list, then the file opens 
without clearcase functionality in the editor. If I open it from the Projects pane, clearcase functionality works. If I 
have a file already open from the Projects panel, and I double click the file in a compiler error, then the already 
opened file is not used, rather a new editor window is opened without clearcase functionality.

In NB67rc3, I have one project for which I added the source from the source directory rather than from the object 
directory through its symbolic link. In this case, if I open a file from the Project panel, then the editor has 
clearcase functionality (as above). But if I open a file from the Tasks list, then the editor does not have clearcase 
functionality (also as above).
Comment 4 Thomas Preisler 2009-06-18 18:45:06 UTC
It would help enourmosly if you create the test case, tar it up, and attach it to this IZ. Can you do that?
Comment 5 paul_floyd 2009-06-18 21:04:16 UTC
Created attachment 83777 [details]
Script to setup testcase in ClearCase
Comment 6 paul_floyd 2009-06-18 21:10:44 UTC
I've just attached a script that should do the job (I'm at home at the moment, so I don't have access to ClearCase to
test it).

Running the script in a directory under clearcase control should give

ls -R
[these bits "view private"]
.:
WA/    test/

./WA:
test/

./WA/test:
Isrc@      Makefile@

[these bits under clearcase control, checked out]
./test:
Makefile   test.c

In NB67, add a new project as 
[basedir]/WA/test/Makefile
build dir
[basedir]/WA/test/
source path
[basedir]/WA/test/Isrc
Comment 7 paul_floyd 2009-06-18 21:14:31 UTC
Created attachment 83778 [details]
try again (forgot to save file before uploading it)
Comment 8 Tomas Stupka 2012-06-26 13:32:55 UTC
is this still an problem? nobody else seems to be impacted, we can't reproduce as well. will close for now, but feel free to reopen in case this still is an issue ...

thanks
Comment 9 paul_floyd 2012-06-26 16:46:42 UTC
I do not at all consider this to be fixed. I's still a very annoying problem.

Has anyone really tried to reproduce the problem?

If you have done _exactly_ as I said, then I'm really interested in knowing how you can get Netbeans to handle this sort of configuration and have the editor open files with ClearCase features active.

I'll repeat the steps to produce it again. Elements in angle brackets <> are general representations.

Create a build directory outside of the source directory. It can be view private, or it can be entirely outside of clearcase.

The build directory contains an "Isrc" symlink to the ClearCase source directory.
The build directory also contains a "Makefile" symlink to "Isrc/Makefile"

The Makefile, as well as the usual build rules, also contains "VPATH = Isrc" so that make can find the source files from the build directory.

[We have a script that builds an entire shadow build directory tree that mirrors our source directory structure].

Ensure that gnu make works correctly.

Create a new project. Choose "<build dir>/Isrc" for the source. I select custom, as we have a wrapper script for gnumake and we use fairly nonstandard options. Choose "<build dir>/Makefile". The rest of the options I leave as the default, except the project name (which defaults to "Isrc") and location (which I put in ~/SunStudioProjects for historical reasons).

NB then automatically cleans and builds the project. In the 'Projects' pane, a new icon is added to the tree with 3 sub-elements. "Isrc - <source dir>", plain blue folder with all files in it. If I open files from this, then ClearCase is activated. Then there is just "Isrc", looks like a source icon, just .h and .c files in it. If I open files from here, clearCase is _not_ activated.

If I open a file from "Isrc - <source dir>", edit it (and deliberaely introduce an error), then I get an error message

Isrc/<source>.c:11:31: error: expected ')' before 'size'
gnumake[1]: *** [<source>.o] Error 1
gnumake[1]: Leaving directory `<build dir>'

The first line is a link. If I click on it, a new editor window opens (whereas I would expect the focus to simply just jump to the window that I just opened to deliberately introduce the fault). This window does not have ClearCase activated.

When I choose the source directory in the 1st step of the new project dialog, it would be possible to choose <source dir> directly at this point, but it doesn't seem to work much better. I only get one "<source dir> - <source dir fullpath>" entry in the Projects tree (which is active in ClearCase), but following compiler errors still opens a window that is not active in ClearCase.

My impression is that with a configuration like this, NetBeans does not know whether it is coming or going with respect to the build directory and the source directory.
Comment 10 paul_floyd 2012-06-26 16:48:51 UTC
Changed the summary to be (a bit long and) more accurate.
Comment 11 paul_floyd 2013-01-10 13:54:13 UTC
Due to a change in job, I no longer use ClearCase, so this can probably be closed.