Question

I have an svn repo that was setup (not by me) without the recommended folders (/trunk, /branches, /tags) which was fine initially, but we are running into problems that really should be fixed in a feature branch and pushed back to the trunk.

There is a remote branch on a webserver that pulls from svn to get its updates (so that we can also make changes there if there is an emergency and push back to the repo.

It would be nice if we could move all of the stuff that should be in the trunk into a /trunk folder, but I am wary to do that because of how I think it will affect the webserver's setup.

If I change the repo, and move all of the code into the proper folders, is there a way to repoint the remote version at the /trunk folder instead of /? (It would be nice if it pulled from tags instead of trunk but... baby steps)

Was it helpful?

Solution

Assuming the webserver is acting as a client of the SVN server and doing updates to pull the latest version of the site, then after making the changes to the structure on the server, you would do:

svn switch --relocate SVN_URL/ SVN_URL/trunk

This would then update the checked out copy on the webserver to the new path and everything should continue along as normal.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top