开发者

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

What is the difference between 'Revert' 开发者_JAVA百科and 'Override and Update' options from Eclipse (team synchronization - SVN (Workspace) - Outgoing mode)?

Thanks in advance.


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


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


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. -

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜