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 130165 - Refactoring and checking out files
Summary: Refactoring and checking out files
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:05 UTC by jmborer
Modified: 2008-03-18 16:25 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
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:05:27 UTC
What happens when you try to refactor a class that impacts other classes? In theory it should check out all the files.
But then: what happens if some files a already checked out as reserved by other people?

My proposition is to open warning dialog where the user could choose between dismissing the refactoring or check out as
"unreserved" the files that are reserved.

But please absolutely avoid modifying half the files (this happened with VSS generics and NB 4.1) because it leaves the
code in a incoherent state that no longer compiles a that you cant undo easily if not worse...
Comment 1 Tomas Stupka 2008-03-14 16:29:24 UTC
> But please absolutely avoid modifying half the files (this happened with VSS generics and NB 4.1) because it leaves the
> code in a incoherent state that no longer compiles a that you cant undo easily if not worse...
did you try it out? there should be a dialog informing yo that refactoring plans to checkout some files before the ref
starts at all. 
Comment 2 jmborer 2008-03-14 16:47:04 UTC
Hmm interesting. I didn't try it yet because this might corrupt my current project.

I tried to refactor one method and the file became hijacked after that!? This brings me to the "working with hijacked
files": I cannot undo the change (no revert or undo hijack options available) and delete the file from NB will probably
delete it in the repo. My only option is to use the CC tools the undo the hijack...
Comment 3 Tomas Stupka 2008-03-14 17:08:17 UTC
> I tried to refactor one method and the file became hijacked after that!?
sounds like a bug. any chance to find out how exactly was the scenario? 

i understand that this could be dangerous on productive data ...
Comment 4 jmborer 2008-03-14 17:25:58 UTC
Refactoring doesn't work well:
- Refactoring doesn't check out the impacted files. 
- It doesn't work too when you try invoke, say "rename" method refactoring on  a class that is not already checked out.
It just does nothing. Same behavior with "preview"
Comment 5 Tomas Stupka 2008-03-14 17:36:16 UTC
you mean it doesn't work for you in general, or only if you have files which are remotely reserved?
Comment 6 jmborer 2008-03-14 20:12:50 UTC
In general
Comment 7 Tomas Stupka 2008-03-14 21:14:37 UTC
this was with a snapshotview, right?
Comment 8 jmborer 2008-03-14 22:07:27 UTC
Yes
Comment 9 Tomas Stupka 2008-03-18 16:25:35 UTC
well, i was able to reproduce some strange behavior with the state around beta. the problems should get fixed in scope
of issue #130044