branch locking mk2.
David Allouche
david at allouche.net
Thu Feb 9 15:05:40 GMT 2006
On Wed, 2006-02-08 at 11:11 +1100, Robert Collins wrote:
> To take out a lock, make a temporary dir with a random name in pending,
> and write a lock object to details.txt in that dir using the 'rio'
> format. Details that are required are 'name', 'time' and possibly
> hostname/pid. Then rename that temporary dir to foo/locked.
Storing hostname and pid allows application code (not bzr itself, but a
larger system using bzrlib) running in controlled environments to
automatically delete stale locks.
For example, if only systems within a LAN can write to a remote branch,
they can be sure that a lock is stale if the stored hostname is their
own and the stored pid does not exist.
Please store the name, time, hostname and pid and provide a public
utility function to retrieve the lock information. There is a use for
that in the Launchpad RCS import system.
--
-- ddaa
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060209/b6665f11/attachment.pgp
More information about the bazaar
mailing list