From: Andrzej J. T. <an...@ch...> - 2008-12-29 23:33:03
|
Eric suggested: > We've been trying to come up with a better approach for versioning our > code and data in Subversion while easily editing/running it in eXist. > So my latest crazy idea for the developers is that I can maybe > checkout of Subversion into my exist data directory? In EXIST_DATA/ > fs/ seems to be the files written out. I just checked out all my > content to this directory, and restarted eXist, and it seemed to > ignore the .svn dirs, but see the files. I edited a file through > webdav, and then went into EXIST_DATA/fs/ and did svn st and saw the > file was changed. > > So, is this a promising avenue for folks who are running eXist > locally, or a rathole? Some things I am wondering is what if I > create a new file, will it be added to exist? Even if this only works for > modifiying existing files, it seems to be a bit easier.. I think it's a HUGE rathole. You should not be playing directly with any files in the EXIST_DATA/ directory, since they are intended to be managed by the eXist server process. Plus those files can and will change often, probably generating a lot of spurious SVN changes. When you say versioning your "code", I presume you mean your XQuery/XSLT source, right? Problem here is that XQuery is now treated as a binary document which will be stored in the fs/ subdir, but XSLT is pure XML and so will be stored (and indexed) in the main eXist data table files. So versioning the latter is pretty much impossible, in the classic SVN sense of the word. Here's what we do....we keep all our code (XQuery/XSLT) and data (config files, images, xml documents, etc.) in a separate directory structure, which is under SVN control and versioning. We have an Ant build script (build.xml) which uses eXist ant tasks to selectively deploy all the SVN versioned artefacts (code and data) directly to our eXist server instance, with a single command. So our workflow is that we edit the freestanding SVN versioned source....then do an ant command to deploy it to eXist and do our testing. When all is working, we just do an SVN commit. We never play with the EXIST_DATA/ directory, except maybe to take a complete backup copy for full recovery purposes. That is the approach that I would recommend. If you are trying to version user-created content (eg. XML documents) then maybe Wolfgang's new versioning extension might be useful for that. SVN is intended for source code management (primarily), not dynamic content management. Trying to mix SVN and WebDAV (ugh!) is asking for trouble if you ask me. My 2 cents worth. -- Andrzej Taramina Chaeron Corporation: Enterprise System Solutions http://www.chaeron.com |