Mark
Mark

Reputation: 1

SVN branches and virtual hosts

I come from a GIT background and now have to work using SVN. Usually, when working with GIT, I had Apache virtual host set up to one folder as document root and when I wanted to switch branches I just did git checkout branch.

From what I see with SVN now, when I make branches I have to make a new folder for each branch. Is that true or is there some other way to accomplish to what I'm used to with GIT?

Because, that would mean I have to make a number of different virtual hosts or use wildcard dns or something.

Thanx.

Upvotes: 0

Views: 808

Answers (4)

MikeSpaceG
MikeSpaceG

Reputation: 116

A way to accomplish what you are used to with git is to use git-svn.

Upvotes: 0

manojlds
manojlds

Reputation: 301177

If you are having something like:

    <VirtualHost [server's IP address]:443>
     ServerName svn.example.com
     <Location />
       DAV svn
       AuthType Basic
       AuthName "svn.example.com"
       AuthUserFile /var/local/svn/svn.example.com/conf/passwd
       AuthzSVNAccessFile /var/local/svn/svn.example.com/conf/authz
       SVNPath /var/local/svn/svn.example.com
       Require valid-user
     </Location>

    </VirtualHost>

you don't have to worry about handling different branches explicitly.

Upvotes: 0

James C
James C

Reputation: 14149

In Subversion branching is just copying a tree so yes, you would be creating a new folder. Have a look at the SVN book for their chapter on branching/merging: http://svnbook.red-bean.com/nightly/en/svn.branchmerge.html

There's no natural mapping between virtual hosts and version control systems like Subversion or git so I'm afraid I can't comment on how it might relate to your different vHosts. Maybe you could talk about your setup a little more.

Upvotes: 0

JW.
JW.

Reputation: 51668

You could use svn switch to switch your working copy to a different branch, if you want to keep it in the same directory.

Upvotes: 1

Related Questions