Reputation: 51
I have deployed an application using svn. Now that I have made some changes I wanted to run svn update
in order to update my application.
After running svn update
errors pop up. However when I remove all files (including the .svn
folder) and perform an svn checkout [repourl]
there are no errors.
My question is what is the difference between svn update
and svn checkout [repourl]
in this situation? Why does a checkout of revision 100 work but an update from revision 50 to revision 100 product errors.
If you need additional information let me know, I've tried to keep it short.
I have looked at Subversion - What are the differences between the SVN checkout and SVN update commands? but this didn't help me find an answer.
Upvotes: 0
Views: 2612
Reputation: 41147
For better understanding, we can break [RedBean.SVNBook]: svn checkout (co) in 2 logical steps:
[RedBean.SVNBook]: svn update (up) downloads from the server (if not instructed otherwise) the latest state (called revision - which is a number that gets incremented by every modification) of the repository (based on the SVN metadata). It will also update the SVN metadata.
That's why svn checkout (svn co) is only used once (at the beginning), and from there subsequent WC updates are performed via svn up.
Since svn co creates (overwrites) the SVN metadata, and then updates the WC, it will always succeed, but since an external factor (the user) can mess up that metadata from the moment it's created, till svn up (or any other svn command as a matter of fact) takes place, svn up might fail.
SVN metadata:
Your WC consists of a folder tree (contains folders and files). All that tree is also "replicated" in the SVN metadata (.svn folder) - that's why it takes up so much space. So, if you modify one of the source files in your WC, and then do a svn status (svn st) on it, SVN will detect the changes and svn diff will display them (in diff format) and this without connecting to the SVN server. Also, showing all the modification that a file suffered over time (svn log) doesn't need to connect to server.
I think it's clear now why svn co "always" succeeds. Regarding "After running svn update errors pop up", without details about the errors, I can't tell you more. Off the top of my head, I think of 2 situations that could lead to errors:
Upvotes: 2