tags:

views:

1536

answers:

7

Hi guys,

I have just setup Visual SVN on my local machine and on our server that hosts our websites. I used the standard default settings when installing the software but I'm a bit confused how to use this with our setup.

I have tested the installation and everything appears to be working ok. In Visual Studio 08, I can connect to and commit the website files to the server successfully using "IP of server/svn/domainname folder". If I point my browser to the url "IP of server/svn/domainname folder" and enter my username and password I see a folder tree with all of the files I just uploaded. So that bits working fine.

My question is how could we test the website I just uploaded? On our server all our websites are stored in "C:\sites\domainname" folders. In IIS we map that folder to the domain name so when someone types in domainname.com they get the right website. How do I config the Visual SVN server setup to allow me use the "C:\sites\domainname" setup we currently have?

Any help would be greatly appreciated as I'm totally confused by this.

Thanks, Rich

A: 

Sounds like you need to check these websites out from subversion to the web server. Map a virtual drive in IIS to those folders.

Edited for clarity.

WakeUpScreaming
A: 

I've never used VisualSVN, but I think that generally, with SVN and webservers, you do a checkout of the appropriate code into C:\sites\domainname.

Then, when you want to push code onto the server, you can run an SVN Update on that directory (assuming the appropriate changes have been pushed into subversion). Obviously I would test this using a test domain and another directory before hand (or just browsing a test directory with IIS).

Personally though, since I use asp.net and C# and use Web Deployment Projects to pre-compile, I generally just move builds myself instead of messing with SVN on the webserver. With interpreted languages such as PHP it's more straight forward.

My svn client on windows is ToirtoiseSVN

scottschulthess
This won't work as VisualSVN uses port 80 for its own apache service
Nik Reiman
A: 

You could do a post-commit hook, that would SVN EXPORT the server to the deploy path.

Manuel Ferreria
That's what I need to do alright. Thanks for the help Manuel.
Richard Reddy
SVN EXPORT exports the source code ... it doesn't build the project for you. I guess you could make this work if you put the build output under source control but that's not a standard practice.
Jamie Ide
Understood - this project isn't live to the public for now anyway so it will let us get started on development while we wait for the dev server to be setup for us.
Richard Reddy
In the post-commit hook, you could command-line-build the app, and re-export it to the actual folder.
Manuel Ferreria
A: 

The problem is that subversion does not store the files normally on the hard disc. It uses a database or a virtual file system to store the file. This is necessary for versioning them. The simplest way do the job would be to use a subversion command line client and write a little batch file which checks out the head-version of your subversion repository and copies the files to your IIS folder. You can call the batch file periodically by a cronjob.

Alexander
A: 

I think you're confused about what VisualSVN is:

VisualSVN Server is a package that contains everything you need to install, configure and manage Subversion server for your team on Windows platform. It includes Subversion, Apache and a management console.

It's a slick package that contains everything you need to run a Subversion source control server on a Windows machine. I love it. Normally you would not install this on a machine that also hosts websites, and I would definitely not do it on one that hosts public facing sites.

Subversion is just a source control system. It doesn't change anything about how you deploy sites.

Jamie Ide
Hi Jamie,Would you mind explaining why you would not install Visual SVN on a server hosting public sites? Surely I would need to so we avoid overwriting one another in the office when uploading new content to the site?I'm new to this so sorry if it's a silly question ;)Thanks,Rich
Richard Reddy
Because it places your source code (i.e. intellectual property) on a vulnerable server. It's typical to have multiple developers committing source code changes. When the changes are tested and accepted, a build process (manual or automated) builds and deploys the site to the hosting server.
Jamie Ide
Thanks Jamie. We are in the process of setting up a local server to handle all of our development before deployment. I just asked because I wanted to check if the issues you had were to do with security holes in the software or not. Thanks for your comments :)
Richard Reddy
A: 

At my company, we accomplished this with the following solution:

  • Set up a hudson CI server to build our products on a regular basis by polling SVN
  • The build artifacts get copied to a folder like c:\artifacts in a build step in the project configuration.
  • We then made a custom apache config file in C:\Program Files\VisualSVN Server\conf\httpd-custom.conf (don't modify httpd.conf; it gets overwritten during updates, etc.)

We then added the following to httpd-custom.conf:

LoadModule alias_module bin/mod_alias.so
<Directory "C:/artifacts">
    Options Indexes
    AllowOverride None
</Directory>

<IfModule alias_module>
    Alias /artifacts C:/artifacts
</IfModule>

Now http://svn.example.com/artifacts/ acts as the testing site, and gets updated automatically whenever any developer commits code to SVN.

Nik Reiman
A: 

hi guys, I really need your help. I've instaled VisualSVN

here is the problem: I have a software project in the repository but I don't want that some people access to one or more folders/files. If I set the security on those file everithing is ok. the problem is that, when I create a Branch I have to set again the security rule to access those critical folders/files. how can I do to ensure that access rules are inherited in the branch?

please help me!!

thank you very much!!

Tommaso