Friday, May 18, 2007

"Revert to Base" - a few things about

In response to bug 106876 new feature has been introduced to eclipse: in the 7th milestone of 3.3 version an action "Revert to Base" appeared in the context menu Team, as shown below:

For every future commiter it is pretty important action. Why?

Let me remind you common cycle of non-commiter contributor work:
1. Pick up a bug
2. Create a patch
3a. Wait for feedback
3b. Go to 1.

Please notice, that point 3b requires switching to head and abandoning previously made changes - because we are writing new patch for another issue (but due to specialization, it may be the same work area).

And now we have quite simple solution - one click and we can restore last loaded version of our software. Always the newest soft will be loaded. Yes, this is almost the same like Team->Replace With->Another Branch or Version -> BASE, but how much less clicking ;).

A few words about sticky tags for those of you, that do not know them: Sticky tags are some ancient invention, I do not see any usage for them. But they can block CVS operations until you removed them, f.e. you cannot commit a resource marked as sticky until you remove that tag or create another branch. And the worst feature of sticky tags - they are set by server in response to certain operations - like f.e. replace with BASE.

And good news for you: in Eclipse 3.3m7 sticky tags are ignored. Whenever the server tries to set them, we gently write current tag to sync bytes. And no sticky nightmare will meet us :).

Sadly, the Revert to Base action has some limitations due to CVS limitations. Deleted files are not restored when replacing with BASE tag. Therefore it is necessary to have local history enabled, at least for one entry. Then the Revert to Base operation is able to restore deleted file and perform update/replacement on it.

I hope this action will help you all in process of eclipse bugfixing. And not only this.



Kevin McGuire said...

Excellent! This is a very handy feature. Recently I was submitting patches for something and wished for exactly this (and for various reasons didn't want to replace with HEAD which had moved on). Nice work.

Przemysław said...

About sticky tags... They are what real tags should be: unmodifiable markers on the files. This is what I miss (can't find?) in SVN, especially when enforcing Good Practices (trunk->branch->tag->release!)