bzr break-lock should show which branch/repo it is affecting, even when there is no lock found.

Bug #532318 reported by Robert Ancell
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
Medium
Unassigned
Breezy
Triaged
Low
Unassigned

Bug Description

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 <email address hidden> 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.

Tags: easy locking ui
Revision history for this message
Robert Ancell (robert-ancell) wrote :

Bazaar (bzr) 2.1.0
  Python interpreter: /usr/bin/python 2.6.4
  Python standard library: /usr/lib/python2.6
  Platform: Linux-2.6.32-15-generic-x86_64-with-Ubuntu-10.04-lucid
  bzrlib: /usr/lib/python2.6/dist-packages/bzrlib
  Bazaar configuration: /home/bob/.bazaar
  Bazaar log file: /home/bob/.bzr.log

Revision history for this message
Andrew Bennetts (spiv) wrote :

> 1. If bzr push had given me the complete command-line to break the lock

That is bug 250451.

> or prompted me "Do you want to break this lock?"

I think we probably don't want to do this, because making a usually non-interactive command just occasionally interactive is likely to frustrate people writing scripts, cron jobs, etc.

> 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.

This seems like a good idea. We should probably make it verbose as you suggest by default, and let people use -q if they really don't want to see output.

> (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).

That's also odd. I'm not sure why that would be the case off the top of my head, possibly something odd in the way the server process sets lock timeouts to 0? First thing to figure out here is if that message is being emitted by the client, or passed along from the server's stderr.

Revision history for this message
Andrew Bennetts (spiv) wrote :

There's quite a constellation of issues here, but I think the key non-dupe/non-invalid/etc issue is this one:

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'll update the title and summary accordingly. If Robert or someone wants to pursue another part further, file a separate bug (or followup on the dupe, bug 250451, as appropriate).

Changed in bzr:
importance: Undecided → Medium
status: New → Confirmed
Andrew Bennetts (spiv)
description: updated
summary: - bzr break-lock confusion
+ bzr break-lock should show which branch/repo it is affecting, even when
+ there is no lock found.
tags: added: easy
Martin Pool (mbp)
tags: added: locking ui
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Changed in brz:
status: New → Triaged
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.