[PING][MERGE] Waiting on locks

David Allouche david at allouche.net
Sun Sep 3 20:07:15 BST 2006


John Arbash Meinel wrote:
> I haven't had any feedback on this, other than Robey's comment that the
> default bzr timeout should be infinite. I'd probably be okay bumping it
> back to 5 min, or something else on request.

I did not review the code, but I have a minor UI quibble about this
infinite time-out idea.

There are reasonable justifications for infinite time-out, but I think
that should really give feedback to the user. Ideally, I think it it
should be something like:

  past_lock = None
  while True:
     current_lock = target.try_to_acquire_lock()
     if current_lock is None:
        # successfully acquired lock
        break
     if current_lock != past_lock:
        # initially blocking on a lock
        # or the lock we are blocking on has changed
        note_lock_details(current_lock)
        past_lock = current_lock

In english:

  * If we block for somebody else to release the lock, print details of
the lock we are blocking on
  * If the lock changes (it was released and retaken between two
attempts to lock), print details of the new lock.

So the user knows that bzr is blocking on lock, and who owns the current
lock.
-- 
                                                            -- ddaa

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060903/48f68a56/attachment.pgp 


More information about the bazaar mailing list