tags:

views:

36

answers:

2

We currently have SVN set up as the source control repository to track changes we make to a CMS, and everyone is checking out local copies from a central repository. As well as this, everyone is working from the same MySQL database backend for the CMS. The CMS we are using is CMS Made Simple. The problem arises with uploads to the CMS. If one developer is to upload say an image file, an entry to the file's location is entered in the CMS database. However this file actually only exists in one developer's local copy of the CMS, as he is yet to check that in. This then causes issues with other developers' copies until this uploaded image is checked in. Does anyone know of a way to get around this problem?

Thanks, Dane.

+1  A: 

As a direct answer to your question, you could set up a solution like Microsoft's free SyncToy to keep developers' content folders in sync with each other. Of course, that doesn't check the files in into the repository.For that, I think there is no way but to add the files to the repo as they come up.

Maybe one of these helps:

As my opinion: File uploads to the CMS in the scope of source control? This sounds a bit wrong to me. I personally prefer having one central copy of the app running somewhere on a web host, that gets updated from a repository once people check in their changes from their working copy (which is for testing purposes only). Otherwise, you'll go crazy merging dozens of changed databases, don't you? To me, in a CMS, code and content must be strictly separated. The subversion repo should contain only code. But, this is just one view. I'm sure there are qualified opinions saying otherwise.

Pekka
A: 

As a follow-up to Pekka, I run this daily:

It doesn't like filenames with spaces, but maybe this can be a starting point.

#!/bin/bash

#This Script will open up "svnProjectFolders" and commit all the projects in that folder

IFS=$'\n'
for line in `cat /Users/memememe/Documents/svnCommit/svnProjectFolders.txt`;
do
        echo "Commiting:  "$line" "`eval date +%c`
        cd $line
        svn st | grep "^?" | grep -v "build" | awk -F "      " '{print $2}' | xargs svn add
        svn commit -m "Daily Commit: "`eval date +%Y%m%d`
        echo ""
done
Stephen Furlani