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.
[ JDK VERSION : 1.7.9 ] Given a checkout revision 1.3. Show the annotations in the editor. Right click on a line with change revision 1.3. A popup is displayed with several menu items. ACTUAL: "Rollback to 1.3"-menu item EXPECTED: "Rollback to 1.2"-menu item Rollback to the same revision is senseless. I want to rollback to the previous one (1.2.) See screenshot
Created attachment 127837 [details] Popup with wrong menu entry
> Rollback to the same revision is senseless. Why? You want to see how the file looked like in the given revision. True, when the file is currently in 1.3 revision it's useless but when you checkout its latest revision, it makes perfect sense. But right, we could add another action. Next to "Rollback to 1.3" there could be also "Rollback to 1.2".
Created attachment 127898 [details] Proposed patch (In reply to comment #2) >True, when the file is currently in 1.3 revision it's useless but when you checkout its latest revision, it makes perfect sense. Correct. I like to propose a patch for this. See attachment. Please review, discuss and commit.
Created attachment 127899 [details] Patch in action
thanks for the patch, it looks fine. Just minors: 1) Use simply NbBundle.getMessage(...) instead of > String format2 = loc.getString("CTL_MenuItem_RollbackToPreviousRevision"); > rollbackToPreviousMenu.setText(MessageFormat.format(format2, new Object [] { prevRevision})); 2) Bundle messages CTL_MenuItem_RollbackToPreviousRevision and CTL_MenuItem_RollbackToRevision are the same, use just one (CTL_MenuItem_RollbackToRevision) I will integrate after the code freeze, we cannot make it till 7.3, will be in NB after this release.
(In reply to comment #5) > thanks for the patch, it looks fine. Just minors: > 1) Use simply NbBundle.getMessage(...) instead of > > String format2 = loc.getString("CTL_MenuItem_RollbackToPreviousRevision"); > > rollbackToPreviousMenu.setText(MessageFormat.format(format2, new Object [] { prevRevision})); > 2) Bundle messages CTL_MenuItem_RollbackToPreviousRevision and > CTL_MenuItem_RollbackToRevision are the same, use just one > (CTL_MenuItem_RollbackToRevision) > > I will integrate after the code freeze, we cannot make it till 7.3, will be in > NB after this release. Thank you. Don't forget to integrate it for the other SCM-providers like GIT/HG/SVN to get a consistent ui.
svn and hg use a different concept, there is only a Revert... action that opens a dialog letting you select a preferred revision. In git i will add Checkout Previous action
applied your patch as http://hg.netbeans.org/core-main/rev/0cd8f9c0002b. Still svn, hg and git could use the same
git - core-main #1f443d576094 hg - needs UI, currently displays a dialog svn - there could be a rollback action same as in search history
Integrated into 'main-golden', will be available in build *201301290001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/0cd8f9c0002b User: Benno Markiewicz <markiewb@netbeans.org> Log: Issue #222178 - Add Rollback to Previous to line annotation's popup\ncvs implementation
fix: http://hg.netbeans.org/core-main/rev/65f464c7458e
Integrated into 'main-golden', will be available in build *201302050917* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/65f464c7458e User: Ondrej Vrabec <ovrabec@netbeans.org> Log: #222178 - Patch for: Add Rollback to Previous to line annotation's popup adding "rollback to" actions to svn blame/annotation popup