Search code examples
eclipsesvnsubclipse

How to update SVN source using subclipse


I am using subclipse plugin in Eclipse to use SVN repo. for commit the source changes i use [Right click -> Team -> Commit]

I need to pull the latest changes from SVN repo. i am seeing options for updating the source

  1. Right click -> Team -> Update to Head &
  2. Right click -> Team -> Update to Version

Which one i have to use to update the latest changes in my local repo and what is the difference between them. Please suggest.


Solution

  • The difference is following:

    Update to HEAD will do svn update.

    In other words it will update your working copy to the last revision from the repository.

    Synchronize with Repository is something similar to svn status -u, but even more.

    It will open a Synchronize tab (or perspective) that displays overview of your local (outgoing) modifications versus repository (incoming) modifications.

    In this tab or perspective, you can review and synchronize (commit / update) individual files, see differences between your working copy files and incoming files from repository, browse commits history, resolve conflicts.

    Update to Revision:

    The standard Update command has no options and just updates your working copy to the HEAD revision of the repository, which is the most common use case. If you want more control over the update process, you should use TortoiseSVN → Update to Revision... instead. This allows you to update your working copy to a specific revision, not only to the most recent one. Suppose your working copy is at revision 100, but you want it to reflect the state which it had in revision 50 - then simply update to revision 50

    Update to Revision can occasionally be useful to see what your project looked like at some earlier point in its history. But in general, updating individual files to an earlier revision is not a good idea as it leaves your working copy in an inconsistent state. If the file you are updating has changed name, you may even find that the file just disappears from your working copy because no file of that name existed in the earlier revision. You should also note that the item will show a normal green overlay, so it is indistinguishable from files which are up-to-date.

    In general, I highly recommend you to check out the SVN Handbook. At least first two chapters.