Apache WebDAV and Subversion Autoversioning
What is WebDAV
WebDAV stands for “Web-based Distributed Authoring and Versioning”. It is a set of extensions to the HTTP protocol which allows users to collaboratively edit and manage files on remote web servers. The tragedy, though, is that despite the acronym, the RFC specification doesn’t actually describe any sort of version control. Basic WebDAV clients and servers assume only one version of each file or directory exists, and can be repeatedly overwritten.
It was only few years, later RFC 3253 added versioning concepts to WebDAV, placing ‘V’ back in DAV, hence the term DeltaV. WebDAV/DeltaV clients and servers are often called just “DeltaV” programs, since DeltaV implies the existence of basic WebDAV.
Original WebDAV standard has been widely successful. Every modern computer operating system has a general WebDAV client built-in, and a number of popular standalone applications are also able to speak WebDAV — Microsoft Office, Dreamweaver, and Photoshop to name a few. On the server end, the Apache webserver has been able to provide WebDAV services since 1998 and is considered the de-facto open-source standard. There are several other commercial WebDAV servers available, including Microsoft’s own IIS.
DeltaV has not been so successful; it’s very difficult to find any DeltaV clients or servers. The few that do exist are relatively unknown commercial products.
Subversion client is not a fully-implemented DeltaV client. It needs certain types of things from the server that DeltaV itself cannot provide, and thus is largely dependent on a number of Subversion-specific HTTP REPORT requests that only mod_dav_svn understands. And also mod_dav_svn is not a fully-realized DeltaV server. Many portions of the DeltaV specification were irrelevant to Subversion, and thus left unimplemented.
Autoversioning
Though Subversion is neither a full DeltaV client nor the Subversion server a full DeltaV server, there is silver lining known as Autoversioning.
Autoversioning is an optional feature which is defined in the DeltaV standard. A typical DeltaV server will reject a WebDAV client attempting to do PUT to a file that’s under version control. To change a version-controlled file, the server expects a series proper versioning requests: something like MKACTIVITY,CHECKOUT, PUT, CHECKIN. But if the DeltaV server supports Autoversioning, then write-requests from basic WebDAV clients are accepted. The server behaves as if the client had issued the proper series of versioning requests, performing a commit under the hood. In other words, it allows a DeltaV server to interoperate with ordinary WebDAV clients that don’t understand versioning.
To activate autoversioning, you will need to add directive known as SVNAutoversioning in Apache httpd.conf file and set it as on.
<Location /repos>
DAV svn
SVNPath /path/to/repository
SVNAutoversioning on
</Location>
When SVNAutoversioning is on, all write request to from WebDAV clients result in automatic commits. A generic log message is auto-generated and attached to each revision.
For reference on how to set up Subversion repository as network share drive using Windows Web-folders please read Using Subversion Repository as WebShare.
References:
[...] - Apache WebDAV and Subversion Autoversioning saved by celestine2008-08-09 - Google Docs Offline saved by [...]
Pingback by Websites tagged "versioning" on Postsaver — August 25, 2008 @ 11:16 pm