C.3 Autoversioning Interoperability

In this section, we'll describe the most common generic WebDAV clients (at the time of writing), and how well they operate against a mod_dav_svn server using the SVNAutoversioning directive. RFC 2518 is a bit large, and perhaps a bit too flexible. Every WebDAV client behaves slightly differently, and creates slightly different problems.

C.3.1 Win32 WebFolders

Windows 98, 2000, and XP have an integrated WebDAV client known as WebFolders. On Windows 98, the feature might need to be explicitly installed; if present, a WebFolders directory appears directly within My Computer. On Windows 2000 and XP, simply open My Network Places, and run the Add Network Place icon. When prompted, enter the WebDAV URL. The shared folder will appear within My Network Places.

Most write operations work fine against an autoversioning mod_dav_svn server, but there are few problems:

  • If the computer is a member of an NT Domain, then it seems to be unable to connect to the WebDAV share. It repeatedly asks for a name and password, even when the Apache server isn't issuing an authentication challenge! Some have speculated that this might happen because WebFolders is specifically designed to operate against Microsoft's SharePoint DAV server. If the machine isn't part of an NT Domain, then the share is mounted without a problem. This mystery is not yet solved.

  • A file can't be opened for direct editing from the share; it always comes up read-only. The mod_dav_lock technique doesn't help, because WebFolders doesn't use the LOCK method at all. The previously mentioned copy, edit, re-copy method does work, however. The file on the share can be successfully overwritten by a locally edited copy.

C.3.2 Mac OS X

Apple's OS X operating system has an integrated WebDAV client. From the Finder, select the Connect to Server item from the Go menu. Enter a WebDAV URL, and it appears as a disk on the desktop, just like any file server.[3]

[3] Unix users can also run mount -t webdav URL /mountpoint.

Unfortunately, this client refuses to work against an autoversioning mod_dav_svn because of its lack of LOCK support. Mac OS X discovers the missing LOCK ability during the initial HTTP OPTIONS feature exchange, and thus decides to mount the Subversion repository as a read-only share. After that, no write operations are possible at all. In order to mount the repository as a read-write share, you must use the mod_dav_lock trick discussed previously. Once locking seems to work, the share behaves very nicely: files can be opened directly in read/write mode, although each save operation will cause the client to do a PUT to a temporary location, a DELETE of original file, and a MOVE of the temporary resource to the original filename. That's three new Subversion revisions per save!

One more word of warning: OS X's WebDAV client can be overly sensitive to HTTP redirects. If you're unable to mount the repository at all, you may need to enable the BrowserMatch directive in your httpd.conf:

BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully

C.3.3 Unix: Nautilus 2

Nautilus is the official file manager/browser for the GNOME desktop. Its main home page is at http://www.gnome.org/projects/nautilus/. By simply typing a WebDAV URL into the Nautilus window, the DAV share appears like a local filesystem.

In general, Nautilus 2 works reasonably well against an autoversioning mod_dav_svn, with the following caveats:

  • Any files opened directly from the share are treated as read-only. Even the mod_dav_lock trick seems to have no effect. It seems that Nautilus never issues the LOCK method at all. The copy locally, edit, copy back trick does work, however. Unfortunately, Nautilus overwrites the old file by issuing a DELETE first, which creates an extra revision.

  • When overwriting or creating a file , Nautilus first does a PUT of an empty file, then overwrites it with a second PUT. This creates two Subversion filesystem revisions, rather than one.

  • When deleting a collection, it issues an HTTP DELETE on each individual child instead of on the collection itself. This creates a whole bunch of new revisions.

C.3.4 Linux davfs2

Linux davfs2 is a filesystem module for the Linux kernel, whose development is located at http://dav.sourceforge.net/. Once installed, a WebDAV network share can be mounted with the usual Linux mount command.

The word on the street is that this DAV client doesn't work at all with mod_dav_svn's autoversioning. Every single attempt to write to the server is preceded by a LOCK request, which mod_dav_svn doesn't support. At this time, there is no data indicating whether the use of mod_dav_lock resolves this problem.



Version Control with Subversion
Version Control with Subversion
ISBN: 0596510330
EAN: 2147483647
Year: 2003
Pages: 127

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net