简体   繁体   中英

SVN Web Development - Path / OS Differences

What is the best way to deal with config / directory / OS differences using SVN to develop and deploy on 2 different platforms?

I am developing in Windows and deploying to Linux.

I'd like to use my home PC to test the files before using commit, I'm using a web framework and you must specify the paths to your system and application files for the framework. Obviously those are different on the 2 machines.

I have the option of using a linux server at home, as a last resort. I really like working with SVN using a GUI right now since I am new to SVN web development.

So what would be the best solution to config differences between my development and live servers?

There has got to be an easier way then changing the file everytime I commit it to the live server, which is really against what SVN is trying to accomplish in the first place.

You can set a svn-prop (property) to ignore the config file. Forcing you to create one (manually or generated) specific to every installation.

One option is to keep the configuration files out of the repository - set them up on their own for both your local and server machines, and then don't touch them again unless you have to. (Using the svn-ignore: property can keep you from accidentally adding the config files to the repository later on.)

Another option is to try to use relative paths and then have the config/etc directories be in the same relative location to the working directory, even if they're not in the same absolute locations.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM