break-lock does not accept upper-case 'Y' as 'yes'

Bug #335182 reported by Jonathan Lange
4
Affects Status Importance Assigned to Milestone
Bazaar
Fix Released
Low
Martin Pool

Bug Description

Steps:
  1. Lock a branch (e.g. Branch.open(url).lock_write())
  2. Run bzr break-lock on that branch
  3. Press 'Y' (must be capital Y) when asked if you want to break the lock.

Expected: Bazaar interprets the keypress as "Yes, I really do want to break the lock"

Observed: Bazaar interprets the keypress as a mistake.

It's possible that bug 217134 is actually a manifestation of this.

Tags: easy lock

Related branches

Jelmer Vernooij (jelmer)
Changed in bzr:
importance: Undecided → Low
status: New → Triaged
tags: added: easy lock
Revision history for this message
Tim Powell (theuiguy) wrote :

It looks like all that is necessary to fix this is to lowercase the user input before comparing.

I've attached a patch that fixes this for me with bzr 1.16.1. With the change it works for variations like Y as well as Yes, YES, and YeS.

It might be desirable to add uppercase Yes and No to the tests of the get_boolean function in tests/test_ui.py.

Revision history for this message
Martin Pool (mbp) wrote :

Thanks for the patch, Tim

Changed in bzr:
assignee: nobody → Martin Pool (mbp)
status: Triaged → In Progress
Revision history for this message
Martin Pool (mbp) wrote :

Sending to pqm with a test. Thanks Tim.

Changed in bzr:
status: In Progress → Fix Committed
Martin Pool (mbp)
Changed in bzr:
milestone: none → 1.17
status: Fix Committed → Fix Released
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.