Merge lp://staging/~mbp/bzr/733136-lock_url into lp://staging/bzr/2.3

Proposed by Martin Pool
Status: Merged
Approved by: Martin Pool
Approved revision: no longer in the source branch.
Merged at revision: 5634
Proposed branch: lp://staging/~mbp/bzr/733136-lock_url
Merge into: lp://staging/bzr/2.3
Diff against target: 58 lines (+16/-7)
2 files modified
bzrlib/lockdir.py (+12/-7)
doc/en/release-notes/bzr-2.3.txt (+4/-0)
To merge this branch: bzr merge lp://staging/~mbp/bzr/733136-lock_url
Reviewer Review Type Date Requested Status
Martin Pool Approve
John A Meinel Pending
Review via email: mp+55706@code.staging.launchpad.net

This proposal supersedes a proposal from 2011-03-31.

Commit message

avoid UnboundLocal error when locking fails (bug 733136)

Description of the change

This fixes bug 733136 by just moving the variable declaration to a place it will definitely be seen.

To post a comment you must log in.
Revision history for this message
Martin Pool (mbp) wrote : Posted in a previous version of this proposal

The fix isn't especially shallow, but I am for not writing a test for it. If people feel I should, I can.

Revision history for this message
John A Meinel (jameinel) wrote : Posted in a previous version of this proposal

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 3/31/2011 7:42 AM, Martin Pool wrote:
> Martin Pool has proposed merging lp:~mbp/bzr/733136-lock_url into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
> Related bugs:
> Bug #733136 in Bazaar: "UnboundLocalError: local variable 'lock_url' in wait_lock"
> https://bugs.launchpad.net/bzr/+bug/733136
>
> For more details, see:
> https://code.launchpad.net/~mbp/bzr/733136-lock_url/+merge/55682
>
> This does a kind of shallow fix for bug 733136 by just moving the variable declaration to a place it will definitely be seen.

What if we pull this out into a helper function, so we don't clutter the
function itself?

Note that if this is getting triggered, there is another bug. Which is
that QBzr is being unable to get write-access to the config when it
wants to set its values. So it sounds like a lock-race or lock
confusion. (bzr is locking and qbzr is locking on top of it.)

Anyway, the fix seems fine, just cleaner in a helper. Would you want to
target 2.3 instead?

John
=:->

 merge: approve
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2UKn8ACgkQJdeBCYSNAAPlDQCgq+DWQ/GdJ3d/pykjYOPrCbQ+
9wkAoK68su5hgMw2Xg8iE7OVCuzOOjsv
=OyWm
-----END PGP SIGNATURE-----

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

rebase to 2.3

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

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches