[RFC] Enhancement to the "already locked" message
John Arbash Meinel
john at arbash-meinel.com
Mon Jul 23 23:14:18 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Right now when acquiring a write lock, we will wait up to 5 minutes for the
lock to be freed so that we can continue. Overall, I'm pretty happy with it,
but I had some ideas to make it a little bit nicer.
Currently the message is:
Unable to obtain lock
bzr+ssh://juju/srv/bzr/public/branches/bzr/.bzr/repository/lock
held by john at arbash-meinel.com on host jigglypuff.arbash-meinel.com [process
#3170]
locked 8 minutes, 27 seconds ago
Will continue to try until 16:59:22
And then we just sit there until the lock is available. (If the lock owner
changes, we will display a new message. This was to handle the case of a busy
shared repo switching between users).
What I would like to see, is maybe just a '.' everytime we check. So that it is
clear that we haven't died, we are just waiting.
And then if we have printed out the warning, when we finally acquire the lock,
we print out something like "Acquired\n".
My big issue is that we don't always get a new progress bar up right away, so
I'm not sure if it has acquired the lock, and is just busy with the next thing,
or is still waiting.
I looked into what it would take, and found it isn't trivial. In that we do our
reporting (by default) to trace.note() which always appends a newline.
Another possibility would be a progress bar that reaches 100% when the 5
minutes are up (or possibly go the other way and reach 0% when we will stop
waiting).
Thoughts?
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGpSg6JdeBCYSNAAMRAvy3AJ9HgfCQVo3Z0cT6+Mb1fU/QRTATCQCfSrFW
koT3UxV+t1LXj/A7YaycjjQ=
=5xl5
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list