[1.5 critical] Branch.lock() does not set RemoteRepository.is_locked() == True

John Arbash Meinel john at arbash-meinel.com
Fri May 9 19:25:50 BST 2008


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

Russ Brown wrote:
| John Arbash Meinel wrote:
|> -----BEGIN PGP SIGNED MESSAGE-----
|> Hash: SHA1
|>
|> Russ Brown wrote:
|>
|> |> In case it helps, I can reproduce this behaviour using 1.4 on both
|> |> client and server.
|>
|> Thanks, it does help. I believe we have had this bug for a while. We
|> haven't
|> noticed because we had more code going through Branch._ensure_real().
|> Specifically:
|>
|> |>> b = bzrlib.branch.Branch.open('bzr+ssh:///')
|> |>> b.lock_read()
|> |>> print b.is_locked(), b.repository.is_locked()
|> True, False
|>
|> |>> b._ensure_real()
|> |>> print b.is_locked(), b.repository.is_locked()
|> True, True
|> |>> b.unlock()
|> |>> print b.is_locked(), b.repository.is_locked()
|> False, False
|> |>> b.lock_read()
|> |>> print b.is_locked(), b.repository.is_locked()
|> True, True
|>
|>
|> Once we have b._real_branch, then the repo locking works as expected.
|>
|> John
|> =:->
|
| I don't know if it's related, but just in case it is...
|
| If I try the same thing without the --short option, I get a different
| error entirely (again using 1.4 at each end):
|
| bzr: ERROR: exceptions.ValueError: key None not a plain string
|

...

| Hope it helps!
|


- --short and --long use different code paths. I'm aware of the different errors.
- --short is triggering the NotLocked one, and --long is a patch I've already sent
to the mailing list.

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

iEYEARECAAYFAkgkly4ACgkQJdeBCYSNAAPeXwCbBQJaIahsHSRDEhT4V1tDjtiF
5egAn10xN7j72G6r9KH05bDnJ0caZnyl
=7UL4
-----END PGP SIGNATURE-----



More information about the bazaar mailing list