tags:

views:

186

answers:

3

Sometimes I have made some local changes and for whatever reason don't want to commit them to the source repository. In this case I like to zip up and save off my changes on my local file system until I am ready to commit them at a later date.

I recall that in an earlier version of eclipse, there was a context sensitive action from the Synchronize view that would highlight in the Navigator view the same files that you have selected in the Synchronize view. Then from the Navigator view, you can choose to export the highlighted selection.

I don't see where that option is still available from the Synchronize view anymore and manually selecting the files in the Navigator/Package Explorer view is tedious. Is there an easy way to export a selection of files within the Synchronize view?

+2  A: 

It's not on the context menu, but going to the Navigate menu up top and selecting "Show In->Navigator" will apply that selection. Whether or not you can export just the selected files, I don't know.

nitind
+1  A: 

Isn't a Patch exactly what you need? There should be a Create Patch context menu item in the Synchronize view and it creates a file with all your changes to the selected source files. You can easily reapply the patch later with Apply Patch.

Jan Soltis
I'm not sure a patch is appropriate in this case. My understanding is that patches are intended to be applied against a specific snapshot. I will want to reapply my changes against a future snapshot and may need to merge. Maybe it could work, but I prefer to manually resolve conflicts.
s_t_e_v_e
+1  A: 

You may want to look at the Change Sets feature.

On the synchronize view, the very last button is the Change Sets button - if you turn that on, you can assign your changes to sets that you define (right click on a file listed and then Add To -> New Change Set.

I set up a change set called Local changes, and then a new change set for each defect/feature I am working on (and set this to be the default change set). When it comes time to commit the changes for a feature or defect, I just right click on the appropriate change set name and click commit.

This way you can keep local changes around as long as you like without worrying about sorting which files need committing and which to keep around (or create a patch from etc).

RodeoClown