[PING][MERGE] Waiting on locks
John Arbash Meinel
john at arbash-meinel.com
Sun Sep 3 20:08:53 BST 2006
David Allouche wrote:
> 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.
Well, my changes actually print that we are waiting on a lock, and how
much longer we will wait. But you bring up a good idea, that we should
peek() and display who is actually holding the lock. (And then we can
print an update if that changes)
John
=:->
-------------- 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/f6579182/attachment.pgp
More information about the bazaar
mailing list