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 19598 - modifying a file in mounted directory which checked out from CVS wont affect
Summary: modifying a file in mounted directory which checked out from CVS wont affect
Status: RESOLVED INVALID
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-18 21:37 UTC by azita kamangar
Modified: 2002-01-25 08:50 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
ide.log file (12.24 KB, text/plain)
2002-01-23 21:52 UTC, azita kamangar
Details
content of modified file outside IDE (25.56 KB, text/plain)
2002-01-23 22:00 UTC, azita kamangar
Details
File content which I see from source editor (23.27 KB, text/plain)
2002-01-23 22:02 UTC, azita kamangar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description azita kamangar 2002-01-18 21:37:55 UTC
Build 020117-1 , solaris 8 , jdk 1.3.1

if we have a directory which have been checked out from CVS and we need to
modify one of the files in this directory

1. check out from CVS 
2. mount the directory to filesystem 
3. modify one of existing file in this directory
4 . In console , outside of IDE , using any other editor make sure that
modification has been applied to file
5 . modification wont affect to file which is mounted and exist in explorer (
which is the case with other files not in CVS system)
6. unmount the directory , mount it back -> still modified files keep old
content and in source editor shows * next to file name indicating change but
doesn't matter if we confirm or refuse the changes , modification wont affect
the CVS mounted  .
Comment 1 Milos Kleint 2002-01-21 07:38:06 UTC
Sorry, But I don't understand whta the problem is.

Comments:
4. I don't like this point at all. You modified something in the IDE,
didn't save it and then modified the file outside of the IDE. Do you
expect that the file opened in the IDE reloads the changed file?
5. you won't get the new content even when you close the editor window
and the reopen the file?
6. I think that once you unmount filesystem, all files in editor from
this filesystem are closed.

Generally I'm not sure you're talking about the file annotation (the
Up-to-date/Local/LMod cvs status annotations) or about the file
content. If you unmount/remount the directory, it HAS to read the new
file content.

Comment 2 Jan Zajicek 2002-01-23 11:20:51 UTC
Comment from Azita (Azita, please do not just reply to messages from
IZ, they are informational only, moreover the reply goes to the wrong
mailinglist, go to the IZ web and add your comments there, thanks):


Hi 
Please see my comments inline



>Sorry, But I don't understand whta the problem is.
>
>Comments:
>4. I don't like this point at all. You modified something in the IDE,
>didn't save it and then modified the file outside of the IDE. Do you
>expect that the file opened in the IDE reloads the changed file?


No , I saved the modification that I made in IDE ( now ,  no * next to
file name 
in source editor ) means file has been saved . now if I modify the
file outside 
of the IDE how can I see the recent modification ? 
Which ssame case works fine with the files which are not under CVS .
 

>5. you won't get the new content even when you close the editor window
>and the reopen the file?


No , as I explained in bug report , I unmounted the file system and
mounted back 
but don't see the rrecent modification .
even unmount the filesystem , closed the IDE , re open the IDE , mount
the 
filesystem -> still don't see the recent modification


>6. I think that once you unmount filesystem, all files in editor from
>this filesystem are closed.
>
>Generally I'm not sure you're talking about the file annotation (the
>Up-to-date/Local/LMod cvs status annotations) or about the file
>content. If you unmount/remount the directory, it HAS to read the new
>file content.


If file is under CVS , no it doesn't read the new file content , instead 
everytime file name shows up with * which means need to be saved and
if I save 
it then overwrites my modification with old content and as long as
don't save it 
file content in IDE would  be different from file content outside IDE .


Hope this could clarify the issue more
Azita


Comment 3 Milos Kleint 2002-01-23 12:01:04 UTC
can you please attach the value of the filesystem's properties:
"Working directory" and "Relative MountPoint"? Also please check if
you are looking at the same sources within IDE and outside of IDE.

I can't reproduce it, everything works fine with me.

A few comments:
> No , I saved the modification that I made in IDE ( now ,  no * next > to
> file name 
> in source editor ) means file has been saved . now if I modify the
> file outside 
> of the IDE how can I see the recent modification ? 
> Which ssame case works fine with the files which are not under CVS .

You cannot see the external modification in the IDE or the IDE's
modification externally?
That's impossible both ways we always open the stream when
reading/writing the file..
Please check yor access rights to the directory and also please attach
the ide.log file to the bug. thanks.




Comment 4 azita kamangar 2002-01-23 21:50:22 UTC
I'm attaching following files
1. ide.log
2. modified file content called Mvj_test.java
3. File content which I see from IDE source editor called
Mvj_fromIDE.java
Please see the differences in line 156 , 166 , 177 , 188 
Comment 5 azita kamangar 2002-01-23 21:52:47 UTC
Created attachment 4362 [details]
ide.log file
Comment 6 azita kamangar 2002-01-23 22:00:52 UTC
Created attachment 4363 [details]
content of modified file outside IDE
Comment 7 azita kamangar 2002-01-23 22:02:40 UTC
Created attachment 4364 [details]
File content which I see from source editor
Comment 8 Milos Kleint 2002-01-23 22:23:28 UTC
ahs.. I see. the problem seems to be that there's a form file or
something that belongs to the java file. When you open the file, the
form file recreats the initComponent() part of java file and you get
the old stuff.. that's not cvs related IMHO, but rather form editor issue.

As Is written in the comment for the initComponent() method:


     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.


Comment 9 azita kamangar 2002-01-23 23:31:01 UTC
I don't agree to close the bug , the warning that you mentioned
applies to part of code which is grayed out in source editor and not
to all code , if you think this is a right behavior would you please
explain following strange result .

1. I create a java code xxx.java and associate .form file with it (
create a form in form editor )
2. compile and execute succesful
3. check in to CVS 
4. now I have the directory mounted which is under CVS 
5.modify my file in form editor ( ok , without any problem changes
applies to file)
Now at this point I decide to check out from CVS means I need my file
xxx.java have the content which I checked in to CVS ( obviousely
different than the recent file content in source editor)
Here I haven't don'e anything wrong or overwrite the code that caused
.form regenerate the file 
6.so I checked out from CVS
7. unmounted my directory from filesystem
8. mount the directory back ,see the content of file in source editor 
* shows next to file name and content is previous modified content not
the file that has been checked out from CVS means I see a different
content for file outside and inside the IDE and if I save the file
overwrites my file which I checked out
 
Comment 10 Milos Kleint 2002-01-24 07:23:21 UTC
ok, what command do you use for the "checkout"? if that's plain cvs
checkout, that won't help you since your local modifications will be
kept in the file. what you need to do to Discard the local changes and
to get back to the original repository sources is to perform cvs
update -C.. that's the checkbox named "Get Clean Copy" on the update
dialog.
Comment 11 Martin Entlicher 2002-01-24 11:24:53 UTC
Azita, did you check out both .java and .form files to the old
revision? You have to have them compatible for the form editor to work
correctly.

You can also open the file via "Edit" to see just the source code. The
form editor will not be opened in this case, which will assure, that
the .java file will not be re-generated.
Comment 12 azita kamangar 2002-01-24 19:33:11 UTC
yes I check out both .java and .form files to the old
revision also I use cvs -C to check out and still same problem is
noticable 
one point which I like to clarify is cvs update happens successfully
means I check out right staff in to my directory but correct checked
out file is not showing in source editor from IDE , that's the main
conflict .
I'm sure if you try to reproduce the bug following mentioned steps
above ( without thinking of any pre assumption) definitely would be
easy to reproduce.
Comment 13 Milos Kleint 2002-01-24 20:56:25 UTC
1. created new directory
2. added it to repository
3. created new form  (on popup menu New/Gui Forms/Panel..)
4. add a checkout + add a textfield
5. save + cvs add+cvs commit
6. add a label + table + save.
7. perform cvs update -C
8. the Cvs output component with the table says form and java files
were updated..
9. close form editor window + double click onthe form object again..
10. voila, the old panel only with the checkox and textfield is back..
sorry.

it works correctly even when I don't close the form editor window, it
just takes a bit longer to reload automatically..


BTW if you have an old version of cvs server, (pre 1.11 I think) then
the -C option is not implemeted yet. You have to delete the files and
then perform regular update on them.
Comment 14 azita kamangar 2002-01-24 21:19:13 UTC
seems here you're missing few steps at the end and just trying to
retrived your saved file , please continue with step 11 
11. modify your form ( doesn't matter , you can add one line comment
or modify the form which affect the source too ex : add one button)

12 . save ( hence : don't commit)
13 : remove the file from your directory to play safe
14 : check out from CVS ( now you have checked out not modified file )
result -> you see the not modified file in directory ( using any other
editor)
15 . mount the same directory back 
double click on the form object again.
it opens previous java file ( modified one ) in source editor

Comment 15 Milos Kleint 2002-01-24 21:40:53 UTC
no, your points 11-14 equal and repeat my steps 4-7.

here's what I did.

11. using the form editor, add the combo and panel.
12. save (change checked outside of the IDE.
13. rightclick in explorer, chose delete.
14. right-click on nodes panel.form and panel.java (that are now 2
nodes and have status Needs-Checkout) and right-click, do CVS/Update.
Files retrieved.
15. What does mount the same directory again mean? I just selected the
panel.java in the explorer and double-clicked.. same results as ever.

Comment 16 dmladek 2002-01-25 08:50:46 UTC
I don't see anything wrong on IDE's behaviour too.
JavaCVS behaves right, and also the editor.
So I suggest to verify/close the bug. What the editor guys say to this?