Storing repo on WebDAV

John Arbash Meinel john at arbash-meinel.com
Fri Oct 19 00:56:16 BST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Ben Gerdemann wrote:
> Has anyone tried storing and accessing their .bzr repo through a WebDAV
> server? I made some quick tests this morning with init and init-repo on
> two different servers, and ran into several errors about missing .bzr
> directories and lock files (sorry don't have the output with me right
> now). I'm guessing that Bazaar uses some file system locking functions
> or techniques to insure atomicity or ordering of file creation that
> don't work through WebDAV. I mounted the server in Linux using davfs2.
> 
> Am I wasting my time even trying this? Is there another way?
> 
> Cheers,
> Ben

The only thing I'm aware of is that we use directory renaming to get locking.
So we do:

mkdir .bzr/lock/pending-RANDOM
write data to .bzr/lock/pending-RANDOM/info
rename .bzr/lock/pending-RANDOM .bzr/lock/held

And we expect that if someone else already has 'held/' that we will get an
error at rename time.

I know we ran into a problem with Twisted, where with their sftp server doing
rename .bzr/lock/pending-RANDOM .bzr/lock/held

would actually create
.bzr/lock/held/pending-RANDOM

rather than failing. (which is what 'mv' does, but not what the rename() system
call does.)

If your DAV is doing the same thing, it would cause strange problems.

We do have the "bzr-webdav" plugin, which would let you "bzr push
http+webdav://host/foo" rather than pretending to mount it locally with davfs2
or some other adapter.

https://launchpad.net/bzr.webdav

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHF/KgJdeBCYSNAAMRAhEWAJ96UxoBBWYPN51mq6wgQdsT8m7eNgCdECa3
V9Uwn4FBVmDWKdWqRaQlARU=
=to+H
-----END PGP SIGNATURE-----



More information about the bazaar mailing list