2010-03-05 01:11:27 |
Andrew Bennetts |
description |
I recently had to break a lock due to an aborted push. The experience was:
$ bzr push
Ctrl+C
$ (make some correction)
$ bzr push
Using saved push location: bzr+ssh://bazaar.launchpad.net/~robert-ancell/simple-scan/trunk/
Enter passphrase for key '/home/bob/.ssh/id_rsa':
Unable to obtain lock lp-66527888:///~robert-ancell/simple-scan/trunk/.bzr/branch/lock
held by robert-ancell@bazaar.launchpad.net on host crowberry [process #10048]
locked 19 hours, 26 minutes ago
Will continue to try until 23:50:32, unless you press Ctrl-C.
See "bzr help break-lock" for more.
bzr: ERROR: Could not acquire lock "(remote lock)":
$ bzr break-lock
(no output)
$ bzr help break-lock
(skim read)
Classic user-error in that I didn't read the documentation, but what would have been nice:
1. If bzr push had given me the complete command-line to break the lock or prompted me "Do you want to break this lock?"
2. If bzr break-lock had given me some feedback when run without arguments (e.g. "Breaking lock on local directory" or "No lock on current directory"). Note that -v doesn't print any information out.
(I was also confused by the "Will continue to try until 23:50:32, unless you press Ctrl-C." line - push was not blocking at that time). |
bzr break-lock should tell you when it does nothing, and on which branch/repo, rather than silently appearing to succeed. This will help reduce confusion when a user tries "bzr break-lock" with no arguments on a local branch and expects it to operate on a remote branch (usually the default push branch).
Actual experience was:
"""
$ bzr push
Ctrl+C
$ (make some correction)
$ bzr push
Using saved push location: bzr+ssh://bazaar.launchpad.net/~robert-ancell/simple-scan/trunk/
Enter passphrase for key '/home/bob/.ssh/id_rsa':
Unable to obtain lock lp-66527888:///~robert-ancell/simple-scan/trunk/.bzr/branch/lock
held by robert-ancell@bazaar.launchpad.net on host crowberry [process #10048]
locked 19 hours, 26 minutes ago
Will continue to try until 23:50:32, unless you press Ctrl-C.
See "bzr help break-lock" for more.
bzr: ERROR: Could not acquire lock "(remote lock)":
$ bzr break-lock
(no output)
"""
It would have helped if: bzr break-lock had given me some feedback when run without arguments (e.g. "Breaking lock on local directory" or "No lock on current directory"). Note that -v doesn't print any information out.
|
|