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 130163 - On Demand chekcout doesn't handle multifile dataobjects correctly
Summary: On Demand chekcout doesn't handle multifile dataobjects correctly
Status: NEW
Alias: None
Product: versioncontrol
Classification: Unclassified
Component: ClearCase (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P3 blocker (vote)
Assignee: issues@versioncontrol
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-14 15:00 UTC by jmborer
Modified: 2008-03-25 17:53 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description jmborer 2008-03-14 15:00:12 UTC
When someone has already checked out as reserved a file and you try to edit and modify the file, you get an error
message. This is OK but after dismissing the dialog, in the projects view, the file becomes labeled [Reserved;\xxx]
which is completely wrong.

What about instead displaying the error dialog where you only can dismiss the window, there would be an option to
checkout the file unreserved?
Comment 1 Tomas Stupka 2008-03-14 15:34:24 UTC
> When someone has already checked out as reserved a file and you try to edit and modify the file, you get an error
> message. This is OK but after dismissing the dialog, in the projects view, the file becomes labeled [Reserved;\xxx]
> which is completely wrong.
- i'm sorry, but i could not reproduce. does this always happen to you when editing a file which is remotely reserved or
was it only the one time?

- could you please attach you messages log file?

> What about instead displaying the error dialog where you only can dismiss the window, there would be an option to
> checkout the file unreserved?
something like this is already implemented. i'm just not sure if it made it into the beta release. 
see the options dialog in the ui spec
http://versioncontrol.netbeans.org/clearcase/docs/uispec.html
Comment 2 jmborer 2008-03-14 16:08:27 UTC
Some new insights: I tried to checkout a class that was using a form. My collegue checked only the Java file out and not
the Form file. Therefore I got the error message, but because NB was able to check out the Form file, in the projects
browser the file became "reserved". This leaves the sources in a inconsistent state and will lead to really serious
problems: you can edit the form but not the java files! You should authorize to modify both or none.

This ca be easily reproduced:
- Create a new JPanel form
- Checkin both files
- Checkout the java file
- Someone else tries to checkout the form (form+java) from the projects browser.
Comment 3 jmborer 2008-03-14 17:15:50 UTC
I confirm the behavior except for the label that I was not able to reproduce. This time NB wont allow me to change the
file either in the code or the designer view. However the form file is actually checked out as reserved... 
Comment 4 Tomas Stupka 2008-03-14 18:34:48 UTC
> Some new insights: I tried to checkout a class that was using a form. My collegue checked only the Java file out and 
> not the Form file
ah! that explains a lot

> I confirm the behavior except for the label that I was not able to reproduce. This time NB wont allow me to change the
> file either in the code or the designer view. However the form file is actually checked out as reserved... 
AFAIK the form not is editable (in editor or designer) if only the form file is writable.

One way or another, i agree that this creates an inconsistent situation we should try to prevent. 
Even if i'm not sure if there is a way how to corrupt data. Eithre nothing or only the java source is editable ...
Comment 5 jmborer 2008-03-14 20:24:06 UTC
Indeed the form is not editable if both files are not checked out. However nothing tells you that you have checked out the form anyway. You therefore might 
reserve files (may several tenth) without knowing about it, which is bad. Therefore you shouldn't allow to check out one and not the other. Or if one could be 
checked you should prefer the java and never the form file: when you change the form file, the java file gets updated, but modifing the java file won't affect 
the form file.