22

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

Thanks in advance.

3 Answers 3

40

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).
0
26

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

2
  • Thanks wleao! I somewhat understood your reply. But, it is still not clear to me. How will the results of these 2 operations differ?
    – Vikram
    Commented Jul 27, 2011 at 20:00
  • check out the "basically"s that I've added
    – wleao
    Commented Jul 27, 2011 at 20:04
5

Update - Merges the current code from repository into yours. It doesnt override your code unless there is a conflict.

Revert - Changes the file to any selected previous version.

Overwrite - Overwrites the current file and replaces with file from repository. -

1
  • Thanks nick. But, I want to know how the output will differ with both operations?
    – Vikram
    Commented Jul 27, 2011 at 20:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.