Question

I need some help implementing SVN into an existing project.

Currently, I have the project production copy on:

/home/www/myproject

But there are some files and folders that I DON'T want to track with SVN like:

/home/www/myproject/images/

/home/www/myproject/static_info.txt

How do I add SVN to this environment without breaking something on the production copy? And without adding to the repository the files/folders that I want to exclude.

And most importantly, what will be the best way to keep the production copy updated automatically after each commit.

Right now I just have set up a blank repo. on /opt/ubersvn/repositories/myproject using UberSVN...

I have read this other question:

Adding version control to an existing project

But I still feel lost (I have never used SVN before).

Était-ce utile?

La solution

Regarding images and static_info.txt - look at svn:ignore properties, that will allow you to exclude files from versioning:

http://svnbook.red-bean.com/en/1.1/ch07s02.html

As for automatic updates, you could look at post commit hooks:

https://mikewest.org/2006/06/subversion-post-commit-hooks-101

You could write a script that will automatically go from there and update the production environment. The emphasis is on "could". It sounds like a straight forward way to break production with an erroneous commit, you might want to test for breakage before you do that.

Also, since svn creates .svn folders all over the place, you should make sure that doesn't interfere with your environment, but I can not really help you here.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top