Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

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

Thanks in advance.

like image 991
Vikram Avatar asked Jul 27 '11 19:07

Vikram


2 Answers

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).
like image 147
crowne Avatar answered Sep 22 '22 10:09

crowne


Revert:

Reverts a file to what it was before it was modified, that is, it gets back to its original revision, dropping any differences between the working copy and that specific revision on the server.

basically: reverts the file changes to the unmodified state. Old revision.

Override and update:

Uploads a newer copy of a file over a modified working copy, dropping any changes and making the file "up to date" as seen by the server.

basically: replaces the selected resource local copy with one from the repository. Revision as seen by the server.

source

like image 23
wleao Avatar answered Sep 18 '22 10:09

wleao