views:

953

answers:

4

Hello,

I have been managing Subversion as an engineering document storage repository for my company. It is working fairly well, however I have a question about how MS Office 2007 formats are (should be) handled by Subversion.

I'm looking at an Excel 2007 spreadsheet (extension .xlsx) in my working copy that Subversion has applied the svn:mime-type property application/octet-stream. This means that Subversion is treated it as binary, right?

I was hoping that the new MS Office document formats would be stored efficiently by Subversion. My understanding is that a full copy of a binary file will be made on every commit of that file, whereas if the file is text, a small change to the file will result in a small amount of additional data being added to the repository (in a typical situation at least).

I don't understand much of the details of XML, but I thought that an XML file was text, and that it would therefore be efficiently stored by Subversion.

Is it possible to configure Subversion so that MS Office OpenXML documents are stored efficiently?

Follow-up (2009-11-09): I've found that Office documents can be stored as plain text using the Office 2003 XML document formats (Excel: XML Spreadsheet 2003; Word: Word XML Document. There is a warning about loss of formatting, but I have yet to encounter any noticeable loss of formatting.

A: 

Have you ever tried to open an OpenXML file in a text editor?

To make it short: it is not text, it is still binary. So no, you can’t make Subversion handle it any different.

Bombe
This answer is actually not very helpful because it does not clarify RjOllos' confusion why a document called "XML" should be binary...
chiccodoro
+2  A: 

Sadly, you can't currently do this with Subversion, but there has been some discussion around this:

http://subversion.tigris.org/ds/viewMessage.do?dsForumId=462&dsMessageId=651443

Jesse Weigert
+1 for the helpful link. Note that the discussion explains that binary diffs are used, but indicates the deltas may potentially be quite large. The main thing you lose is the ability to easily track changes between versions.
ire_and_curses
TortoiseSVN does diffs on Word and Excel files quite well. As of Office 2007, PowerPoint diffs are no longer supported, however.
RjOllos
+10  A: 

Subversion handles binary files quite well. It does not store a full copy for every commit but only an efficient binary diff.

See the FAQ about this.

Stefan
After also reading the response from wcoenen, it makes me wonder if Office 2003 documents would be stored more efficiently by Subversion. Wcoenen's data shows that a duplicate (or nearly a duplicate) of the data file is being made (hypothesized to be because of the data compression). Since Subversion handles an ordinary binary file fairly well, it would be interested to repeat wcoenen's experiment with Office 2003 format documents, which I will try to do.
RjOllos
+12  A: 
Wim Coenen
Nice experiment! In Word 2007, if I choose Save As.. -> Other Formats, one of the options is Word XML Document (*.xml). This option saves the file as an XML document that can be viewed in WordPad.Word XML format appears to be different than uncompressing the DOCX OPC package. Anyone have input on the pros / cons of using Word XML format? I will repeat wcoenen's experiment with documents in the Word XML format, just to be sure.
RjOllos
technomalogical