I am attempting to use tortoiseSVN to solve a small problem which I am having.
I have a development laptop, and develop the majority of my websites on it.
If however I am on the move, and someone sends me an SMS reporting a bug for example, I often login to my ftp on any computer there an then, and fix the website ‘live’ per se.
If i then make an additional change on my development laptop, I often forget about the live change that I have made, and as a result lose it.
As such, I am looking to use tortoiseSVN to alleviate this problem.
My hosting account is a shared hosting account with hostgator which does NOT support SVN repositorys.
Am I correct to think that the way SVN works is that my ‘live’ copy MUST be the repository? Or am I missing the point?
Could someone explain how I would go about achieving what I want, even if it requires a hosting change.. or perhaps an alternative which suits my situation better..?
Many Thanks.
Tom
I’m not sure about what you mean by “live” copy, but here is how you work with SVN.
First you have a svn server, this can be on your laptop, but should preferably be on separate with automated backups etc.
Then on your local machine you have the working copy. The working copy is a mostly a clone of the content on the server, but with your local modifications. When you are satisfied with your local modifications you commit (submit) the changes to the server. If you are not satisfied with your local changes you can easily revert to the version on the server (or an older version).
To get things to your production environment has nothing to do with svn. This is called a deployment process or release process. A deployment process typically compiles, backs an installer or collects files to be installed and finally installs/copies the result to your production environment.
The “master” copy of your application/web site should be on the svn server. To get something into production you run a script or follow a manual procedure to get the content from a working copy to the production.
By using an svn server as the master copy instead of your laptop you don’t solve the problem of missing updates when you “cheat” by editing files directly in your production environment. But if you have remote shell access (ssh) you can have a local working copy on the production server, edit stuff in the working copy and check them in by command line svn tools.
Edit
To clarify: your “live” copy should absolutely not be the repository. The repository is not structured like a regular file tree with regular files in it. More like a sequence of changesets.
Your “live” copy should preferably not be a working copy either. The working copy contains special folders and files to keep track of “stuff” that you don’t want on your public web site. Your live copy should be a copy of relevant files in a working copy. Either with
copy *.html /www-folder/orsvn exportor some more elaborate method.