These are the steps that I’ve followed to have a SVN Server for a company running Magento with modules and several developers.
1) Create the default structure
/root/my_project
.
|-branches
|—stable (production stable versions)
|—vendors
|—–x (release versions from Magento)
|-tags
|-trunk
|—data (database backups)
|—scripts (shell scripts)
|—src (last version of your development magento site)
2) Copy your initial Magento version. Delete and create templates (or use SVN ignore/lock instead for this)
# cp -R /srv/www/htdocs/Handpicked /root/my_project/trunk/src/ app/etc/local.xml (*local.sample.xml) media/ var/ 36093_nmerchandis.txt .project .server-monitor/config.php (*config.sample.xml) .server-monitor/phpMyAdmin/config.inc.php (*config.sample.inc.xml) (*template config files)
3) Copy your Magento original version under
/root/my_project/branches/stable/1.4.0.1/
4) Create repository
# svnadmin create /srv/svn/handpicked # chown -R wwwrun:www /srv/svn # /etc/init.d/svnserve start # /etc/init.d/apache2 restart
5) Add the first version of your project
# cd /root/my_project # svn import . http://ec2-xx-xx-xx-amazon.com/svn/repo/ -m "Initial version"
6) Merge Production image folder wih Test image folder script
#!/bin/sh rm -rf /srv/www/htdocs/Handpicked/media/catalog/product/cache rsync -e "ssh -i /root/.ssh/handpickedserver.pem -c blowfish -l root" -avx --delete-excluded --recursive --exclude '*media/catalog/product/cache*' root@www.handpickedcollection.com:/srv/www/htdocs/Handpicked/media /srv/www/htdocs/Handpicked/
/root/my_project
.
|-branches
|—stable (production stable versions)
|—–1.4.0.1.handpicked23
|——-data
|———HandpickedMagento.sql.gz
|——-scripts
|——-data
|———[...]
|—vendors
|—–magento (release versions from Magento)
|——-1.4.0.1
|———[...]
|-tags
|-trunk
|—data (database backups)
|—scripts (shell scripts)
|—src (last version of your development magento site)
|—–[...]
Errors:
svn: Can’t open file ‘…file.txt’: No such file or directory
This is a case sensivity issue. Please remove from console the file with “svn del” and “svn commit” before checkout again.
… Could not read chunk size: connection was closed by server …
This is a timeout issue. Change in /etc/apache2/server-tuning.conf
KeepAliveTimeout 15
TO
KeepAliveTimeout 360