Do not create a repository in the web server directory! This is the first part of your problem.
Your repository can live anywhere, just do not put it in the web server directory.
When you configure Apache httpd (if that is what you are using), install it to ignore .svn folders as follows:
<DirectoryMatch \.svn> Order allow,deny Deny from all </DirectoryMatch>
Now, somewhere else besides your web server, create a Subversion repository. Place an order from this repository in the working directory in a different place, and not in your web server directory. Now you can import all the files that will be in your repository and transfer them to the Subversion repository.
Once you do this, you can go to your web server directory where you want these files to be displayed, and do a check.
You should have three things:
- Subversion repository that does not belong to your web server .
- The working directory containing all of your files on your website is not on your web server .
- The working directory located in your web server directory.
The plan is this: you make changes to the working directory, which is not in the directory of your web server. Here you can conduct testing and make your changes here. You also perform all your tests here.
Once you are satisfied with everything, you can do svn update in the Subversion working directory, which is located in your web server directory. This way you do your work outside of the web server, check, and then do svn update in the web server directory.
If you want to get really fantasy, you can create a web branch that will represent the code in your web server directory. Then you can check your code and whatever you want. When you are ready to implement it on your website, you can combine it with a web branch. When you update the working directory in your web server, it pulls the code only to the web branch.
In fact, you can automate this process with a kind of cronjob. You move your website down, update the subversion working directory in your web server directory, and reload your website. This ensures that the files that the web user is looking for are not modified from under them.