Microsoft Office and Subversion (Part 1)
- Good knowledge about Microsoft Windows and Windows Explorer
- Intermediate to good knowledge about Microsoft Office
- Access to an existing Subversion server instance with Autoversioning Commit enabled
- Optional: TortoiseSVN has been installed on your computer
Subversion is the perfect storage for Microsoft Office documents
- Accessing your storage runs either through http (https) or through nice Windows Explorer extension TortoiseSVN
- Binary formats are handled very well and efficiently
- Triggers released by your activities on Subversion allow defined and controlled way to disseminate information about changes
- Each document or the folder containing these documents keeps arbitrary number of properties to store meta data about your document
- Version numbers of your document could be projected directly into your document
In the subsequent blogs we will have a look on each of these topics more in detail.
With this blog we have a look how you work with Microsoft Office and Subversion.
Accessing Your Subversion Instance
This way to work with documents located in a Subversion repository is the easiest one you can imagine.
Just drop a URL into the open file dialogue which starts with “http://…” pointing you directly to a document in Subversion and start your work.
Each save will generate a new revision in Subversion. Please use this option sparsely especially if you are working in a network where bandwidth is a valuable resource.
By using TortoiseSVN you keep local copies on your desktop or laptop computer. If you are often offline or prefer workplaces outside office, this is your choice. Before you start please ask your project manager or system administrator for URL of your project.
Also make sure that you have installed TortoiseSVN on your computer. You can check this briefly by right clicking in the Microsoft Windows’ Desktop.
Now browse to a folder where you like to put your documents into downloaded from your Subversion server and right-click on the folder which should be empty. Select “SVN Checkout…” and enter rhe URL provided by your system administrator or project manager identifying the location of your documents in the Subversion repository.
Preparing Your Documents for Exposure of Subversion
Select all your documents in your local workspace. Right-click and select “Properties” in the bottom of the context menu. Select the “Subversion” tab.
With the help of this dialogue box we add Subversion meta data to selected documents. This could be any kind of tag/value combination.
Subversion itself uses special keywords which let you influence Subversion’s behavior on the server or locally. If your organization is considering Subversion as document repository use these Subversion properties to store additional data which should not be kept in the document itself. In a later blog we will show to expose such kind arbitrary data in your Microsoft Office documents.
Now let us move on and prepare us for the next part of this blog.
In the properties dialogue click on “Add…” button opening a windows which let you add your tag/value keys. TortoiseSVN offers some of the special keywords in the drop-down menu. Please select “svn:keywords”, that is the name of the property.
Now enter the property value as shown in the screen-shot, “Date Revision Author”. The sequence of these keywords is irrelevant. Confirm and close all dialogues by pressing OK.
Confirm and close all dialogues by pressing OK.
In the subsequent step you will learn how to write your changes back into the server. Another time you right-click on your working directory or if you like on single files and select the menu item “Commit…”.
Commit writes all changes back to the Subversion repository. If the transaction could not be performed Subversion’s repository reverts the full transaction and does not keep the server in an unpredictable state.
A successful commit will be acknowledged by Subversion by returning a “Revision” number. This revision number let you identify the status of your data in the timeline of your work.
Numbers like this are pretty hard to remember. Subversion also allows attaching a message to each commit. This is your log or audit trail to review changes.
The upcoming dialogue shows status information during data transmission back the server. If the transaction succeeds, you will see message similar to the one in the screen-shot
Now stay tuned for the next part in this blog series when we pull in the Subversion revision meta data, like author, revision number, commit message or date into the document each time when we commit our changes.