ocornu
ocornu

Reputation: 579

Netbeans 7: comparing local files with SVN revisions

I would like to switch from Eclipse to Netbeans. I've installed Netbeans 7.1 under Ubuntu 11.10.

I manage my projects with SVN.

1/ I would like to compare a local file with a specific SVN revision. In Eclipse, we can do the following:

How can I make the same thing with Netbeans?

2/ Making a diff between two files, I would like to copy specific code blocks. How can I make the "Copy current change from left to right" Eclipse feature within Netbeans?

Upvotes: 2

Views: 1903

Answers (1)

Mike
Mike

Reputation: 8100

1: you need to either right-click on the file name in the tab at the top, or right-click on the file name in the Files tab. In either one, choose the Subversion > menu item and then select Search History.... You cannot do this just by clicking anywhere in the file editor, as you can in Eclipse.

2: Once you're in the Subversion History as above, click on the "Diff" tab-like-thing up top, select your one revision (which will compare that revision with the previous), or the two different (non-consecutive) revisions you want to compare, and in the panes below, manually highlight and copy the code that you want to grab from an old revision, edit the current version of the file (in a new, regular editor tab), and paste the code where you want it. So far as I know, there's not an automated way to grab old code from SVN history in NetBeans.

Upvotes: 2

Related Questions