Eclipse: Difference between 'Revert' and 'Override and Update'

Vikram picture Vikram · Jul 27, 2011 · Viewed 25.9k times · Source

What is the difference between 'Revert' and 'Override and Update' options from Eclipse (team synchronization - SVN (Workspace) - Outgoing mode)?

Thanks in advance.

Answer

crowne picture crowne · Jul 27, 2011

Here is the scenario, assume that you and your team mate (Bob) are both in sync and up to date with the repository.

  • You both have local copies of hello.txt revision 100
  • Bob commits a change resulting in hello.txt(101) in the repository
  • You have uncommitted local changes against hello.txt(100)
    • If you try to commit you will get a conflict because your revision (100) is out of sync with the repository which is now at revision(101).
    • If you revert you will move back to revision 100, and lose your local changes
    • If you override and update your local changes will be overwritten by Bob's latest revision from the repository and you will end up with a local copy of revision (101).
    • If you merge the changes, and 'mark as merged' then you can commit and create revision (102).
    • Once you re-apply your changes and commit you will create revision (102).