When you update, the contents of your working copy are updated with all of the changes that have been committed to the repository since you last updated. Subversion is pretty smart about updating and never just overwrites files that have local changes with copies from the repository.
svn checkout checks out (retrieves) a working copy of the repository into the specified folder. If you don't have access to the repository, and there's not already a current copy of the source in the folder, you can't possibly do a build. If there is a current copy of the source there, it should include build.
So we right-click on this folder and select 'SVN Checkout…' From here we'll specify the location of the repository that we want to check our files out from. So something like… If you've forgotten what this URL is then you can go back to the VisualSVN server app and right click to select 'Copy URL to Clipboard'.
Simply type svn update [name-of-directory] , or cd to that directory and type svn update there. Show activity on this post. It's called "svn.exe": svn up .
svn checkout --force svn://repo website.dir
then
svn revert -R website.dir
Will check out on top of existing files in website.dir, but not overwrite them. Then the revert will overwrite them. This way you do not need to take the site down to complete it.
Try the --force
option. svn help checkout
gives the details.
This can be done pretty easily. All I did was move the existing directory, not under version control, to a temporary directory. Then I checked out the SVN version to my correct directory name, copied the files from the temporary directory into the SVN directory, and reverted the files in the SVN directory. If that does not make sense there is an example below:
/usr/local/www
mv www temp_www
svn co http://www.yourrepo.com/therepo www
cp -pR ./temp_www/* ./www
svn revert -R ./www/*
svn update
I hope this helps and am not sure why just a simple SVN update did not change the files back?
I did not have 1.5 available to me, because I am not in control of the computer. The file that was causing me a problem happened to be a .jar file in the lib directory. Here is what I did to solve the problem:
rm -rf lib
svn up
This builds on Ned's answer. That is: I just removed the sub directory that was causing me a problem rather than the entire repository.
Pull from the repository to a new directory, then rename the old one to old_crufty
, and the new one to my_real_webserver_directory
, and you're good to go.
If your intention is that every single file is in SVN, then this is a good way to test your theory. If your intention is that some files are not in SVN, then use Brian's copy/paste technique.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With