Compare/Replace with older version of resources using the Local History

Want to revert back to a version of a file as it was two days back?
Cannot figure out on what is changed today?
Want to know what did your colleague change in your code?

And you are not using any source control?

Do not worry, Flex builder is taking care of the "Local History".

To compare with a previous version of the same resource, do the following:

In the Navigation View, right click on the resource that you want to compare with an older version of the same resource (a.k.a. local history)

From the context menu, point to ‘Compare With’ and select ‘Local History…’

If any local history exists for that resource, then the Flex builder will open up the history view with all the saved local "Historical" versions of the same resource. It will also show you the timestamp of the revision times.

To compare the current version with a local history version, you can double click on a time stamp in the history view. Alternatively, you can also right click a version from the history view and select ‘Compare Current with Local’

tmp61

Flex builder will show a Text Compare screen (as shown above) which you can use to compare the two files.

tmp62

The toolbar on the text compare window can be used for:

Tip: You can also open the History view from Windows > Other View… > Team > History.
And then you can simply drag and drop resources from the navigator to the history view to see the local history.

The History view does not refresh when you select a different resource in the Navigator, to refresh the History, click on the refresh icon on the History window toolbar.
tmp66
You can also link the History view with the Navigator and the Editor by clicking on the link icon.
tmp67

Note: By default Flex builder will keep a maximum of 50 entries per file for the past 7 days where the maximum file size must not exceed 1 Mb. If you want to configure these preferences, Open the ‘Preferences’ window and navigate to the following page:
General > Workspace > Local History

If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.

Comments

This isn’t Flex Builder specific. It is an Eclipse feature. If you want to learn more cool Eclipse features, you should check Tips and Tricks under Help.

Thanks for the tip. It’s the most useful one I’ve seen for quite some time. I’m sure it’s going to save my bacon one day soon.

Leave a comment

(required)

(required)