Question

I'm working on building a website using Magento eCommerce. I set up a subversion repo on the server for the website including all Magento PHP files and checked out a copy to my local system using svn/webdav. I've added magento to the repo and committed. Now, any svn opearation, even an svn status or svn commit, building the list of files so I can enter a commit message, takes forever. I mean upwards of 10 minutes, even if I only changed one file. Any ideas on what could be wrong/how to troubleshoot/how to fix/suggestions? Thanks!

Was it helpful?

Solution

I've been working with Magento + SVN(not WebDAV however) myself and didn't have those kind of problems so far. It takes long(as in 2 min) to commit changes to the repository but by no means more than 5 min.

I don't really know the cause of your problem, I just more or less wanted to say that it's usually not like that(or that it might be WebDAV's fault).

Workaround 1:

Assuming that you won't be making changes to the core of Magento, have you considered only versioning those parts of your Magento installation that will be changed by you? i.e. the app/code/local folder where your modules will reside and maybe your template folder. This would drastically reduce the total number of versioned files/folders and thereby significantly increase the synchonizing speed.

Workaround 2:

Always commit only the downmost folder that contains all the updates.

cd app/code 
svn commit -m ".." local

Workaround 3:

Similar to number 1: Try to add everything that doesn't need to be stored in the repo to the ignore list. Things like the var/ folder don't need to be versioned and contain a lot of files, so it might be a good idea not to include them to your repository.

Workaround 4:

Use git instead of SVN if that is an option for you.

eZ Components had the same problems with SVN + WebDAV and someone compared the checkout times between SVN+DAV with git. The results can be seen here.

After seeing those numbers, I think switching is your best available option in the long run.

OTHER TIPS

All Magento work can be done without touching a single core file which is the way you should do it (except perhaps for the locale files since those are easy to merge).

I have written a script which lets you scatter your project files all over Magento's installation root without increasing the difficulty of managing your source code (and without checking in a single Magento core file). How does it work? Soft links. You could actually accomplish the same without my script by creating soft links by hand, but this just makes it easier (deployment/update to a live server is always one command).

I'm not sure about Windows support, it could work within cygwin but I haven't tested. I do development on Windows but run a virual machine (VirtualBox) with my LAMP stack on it sharing the files with the Windows via Samba so I run the script via command line on the Linux guest and edit my files with Netbeans via the Samba share (and I can commit changes via Netbeans' subversion module).

See my blog post for further info: Module Manager
Go straight to the source: Module Manager (via gist)

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