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.
A very interesting IntelliJ feature which got a lot of attention from the audience at an IDE shootout I recently participated in was a feature called "Shelve Changes" in its version control integration. Use case: Say you have a modified file you are working on. Suddenly you get a P1 bug that also requires you to make changes in that file, but the changes are unrelated to the changes you already have locally, or your changes are unfinished. You can "shelve" the changes, and a diff is stored, and the file is reverted. You fix the P1 bug, commit it, and then "unshelve" your changes. The IDE remembers that you have shelved changes for this file, and there is a UI that shows all the ones on your "shelf", and you an reapply them with a right click and an action.
Wouldn't you just clone your working_clone that has the uncommitted file changes to say p1_clone, work on this p1_clone make your fix, push back the changes and then go back to your working_clone? In your p1_clone you can do a Show History for the last few days and revert any of the committed changes before starting your work if you need to.
I would do that if I were using Mercurial, yes :-) It's one of the reasons I like Mercurial. But for CVS or SVN, it's more difficult. I would need either a fresh checkout, or I would have to 1. make a patch file 2. revert my local changes 3. fix my P1 4. commit that, and then 5. reapply my patch This feature collapses 1 and 2 into one easy step, and 5 into another easy step. Much simpler to click twice than to export a patch, revert, and reapply when I'm done.
We planned to do similar feature for 6.0 Local History but unfortunately we did not come to UI conclusion with HIE on this. What we thought of: 1) Have a Set Label... in Local History that would label the current state of files on disk 2) Have a Rollback to Label... in Local History that would revert changes to the previously labeled state 3) As a bonus, have a Set Base Label... that would behave similarily to real versioning Base so that Inline Diff, Diff, Rollback and other base-related versioning operations would work also with just Local History I assume this would cover your use cases: 1) Set Label -> Work_before_Fix 2) Rollback Changes (in whatever versioning system) 3) Do your fixing 4) Rollback To Label -> Work_before_Fix
Cool. I would say, use the same term as IJ did - "shelve changes" requires much less thought to understand than "set label".
fixed: Team -> Shelve Changes and Team -> Unshelve Changes Works for subversion and mercurial.
Integrated into 'main-golden' Changeset: http://hg.netbeans.org/main-golden/rev/c2bfbe83e9ba User: Ondrej Vrabec <ovrabec@netbeans.org> Log: Issue #126344 - Ability to "Shelve Changes" general infrastructure