James Courtier-Dutton wrote: > Hi, > > Has anyone tried using svn(subversion) to store openoffice documents? > If oowriter2 could be integrated with svn, one could turn openoffice > into a distributed document writing tool. This would be a major > advantage over using MS Word. > > I tried unziping the .odt and storing those files in svn, but the diff > is not ideal, as the entire document appears to be on one line according > to diff. > > Any comments?
I already thought about that (stimulated by a discussion on the 2004 OOoCon in Berlin) and I think it's possible if you mean that svn shall reflect the internal ZIP hierarchy so that every document becomes a folder in svn containing files and sub folders for the document content. IIRC svn allows to access it through WebDAV, so the "only" thing we need is to exchange the component implementing the com.sun.star.embed.Storage service that stores the content of documents into a ZIP package by providing a hierarchical file system like view to it by another service that stores to a location represented by a UCB content. Such a service already exists in OOo, it is currently only used to store UI configuration files to the local file system or into a document by the same API, but it will also work if you let it access a WebDAV or FTP resource (everything that can be acessed by a UCP and is able to provide files and folders). If this "unpacked" storing is done to a WebDAV folder working on top of a directory in svn you will get a directory in svn for each document you save, containing all streams inside the package as a file. I don't know how good the WebDAV support of svn is, at least it must be possible to create sub folders because OOo documents contain them. Another way would be to write another new OOo service implementing the com.sun.star.embed.Storage service where svn is accessed directly to fulfill the service contract. By using a configuration setting or function parameter to use this new service (or the above mentioned UCB based storage) instead of the "regular" one that stores into a ZIP package you can directly store to svn. Best regards, Mathias -- Mathias Bauer - OpenOffice.org Application Framework Project Lead Please reply to the list only, [EMAIL PROTECTED] is a spam sink. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]