odfsvn is a toolset that allows you to store ODF documents in a subversion repository. You may be wondering why you would want to store your documents in subversion. There are a few reasons:
odfsvn makes this very easy: it stores all repository information in the ODF metadata, which means that you do not need to configure anything on your system: all necessary information is already contained in the document. To illustrate how this works lets examine the differences between using odfsvn or email when working on a document with multiple people.
Lets take a look at Alex, Burt and Charles who are working on a proposal. Alex writes a first draft and mails that to Burt and Charles. Burt makes a few changes and mails the updated document to Alex and Charles. Finally a few hours later Charles comes into the office and finds two emails with documents. He needs to read the emails to see which one has the latest revision of the document, download the attachment and edit that. When he is done revising the document he sends his updates back to Alex and Burt. As you can see this scenario involves a lot of emails being exchanged at every step, people having to switch from their email application to their office application and back again for every revision and no quick method to check if you have the latest revision of the document.
Now lets see how Alice, Bernice and Charlene are preparing a new marketing proposal. Alice creates a first draft and uses odfsvn to store it in a central subversion repository and mails it to Bernice and Charlene. Bernice is the first to respond and uses odfsvn to update the document to the latest version before editing it. When she is finished making changes she again uses odfsvn, this time to commit her changes to the repository. When Charlene comes in after lunch she sees the email from Alice. She grabs the attachment, just like Bernice did earlier, uses odfsvn to update the document. odfsvn updates the document to the version Bernice commited earlier and Charlene can start editing.
As you can see the second scenario is much simpler: there is no longer a need to exchange extra emails or for people to switch between their mail and office applications: odfsvn will always be able to update a document to the latest revision. In a future version when odfsvn will also be available as a plugin for OpenOffice.org this will be completely automatic.
Suppose you are working on a proposal with a group of people. The proposal
is stored in a file called proposal.odt
which you have just
created. The first thing that you need to do is import this file into an
existing repository:
$ odfsvn import -m "Simplon proposal for odf RFP" proposal.odt \ http://code.simplon.biz/proposals/odf.odt Commited revision 22
This will have added your file to the repository. The -m
parameter
was used to set the commit message for this change.
You can now use the info command to check the repository information inside your file::
$ odfsvn info proposal.odt Path: proposal.odt Type: svn URL: http://code.simplon.biz/proposals/odf.odt Repository UUID: 1a87ecf8-a9bc-47a4-9dc9-5f45153203cc Revision: 22
If one of your co-editors wants to work on this proposal he must first retrieve the document using the checkout command::
$ odfsvn checkout http://code.simplon.biz/proposals/odf.odt Checked out revision 22
He can now edit the odf.odt
file using his normal editors. After
making any changes he can commit them using the commit command:
$ odfsvn commit -m "Added estimates and initial planning" odf.odt Changes committed.
You can now update your local copy using the update command:
$ odfsvn update proposal.dt Updated to revision 23
You can download ODF-SVN from the SourceForge Download Page or from the Python Package Index.