[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

New feature request for svn: merge zipped xml

From: John Locke <mail_at_freelock.com>
Date: 2003-04-25 02:55:58 CEST

Hello,

Just took a quick scan through issuezilla, and didn't find anything
related.

I'm using subversion to manage documents and spreadsheets. What I'm
wondering is how difficult it would be to merge versions of OpenOffice
documents the same way you merge text files.

Right now, OpenOffice files are treated as binary files, so you have to
open each version up and compare the documents in OpenOffice. Not bad,
but what a win it would be if Subversion could auto-merge these files
where possible.

I did a little digging, and learned that all of the OpenOffice file
formats are simply zip archives with a standard set of XML files inside.
These are all plain text.

Seems to me this is what would be involved:

--add another content type that svn understands (perhaps mapped from
mime-types?) indicating a zipped archive of text files--in addition to
binary and text.
--when diff'ing this type of file, first unzip it, then compare
file-by-file in the archive, and then generate a report indicating which
files have changed, and where.
--when merging, apply the changes and zip it back up.

Could this be done with a set of hooks?

The tricky part about this is that it looks like the XML files don't
have many line-breaks... the content.xml for a book chapter I'm working
on had two lines in it (it's a 12 page file!). So a diff that works
line-by-line probably won't work here.

Comments? Is this something that you'd consider adding to the
enhancement list?

I'm not a developer, but I am a writer, and I'm starting to write about
this stuff. I think subversion might turn out to be a great solution for
small businesses/organizations in dire need of a revision control
system. Being able to handle this type of change would be--awesome!

Cheers,

-- 
John Locke
http://freelock.com
Recently published: "An inexpensive e-mail server setup"
http://www.techrepublic.com/article_guest.jhtml?id=r00620030325gcn01.htm
Play sports? Check in at http://teamcheckin.com
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Apr 25 02:56:48 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.