[merge] restore 'bzr push' within a single repository
John Arbash Meinel
john at arbash-meinel.com
Mon Feb 12 22:43:29 GMT 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I'm pretty sure I worked out the problem when you have 2 branches in the
same repository.
Basically, 'Branch.push' was grabbing a write-lock on the source, when
all it needs is a read-lock. If source and destination are in the same
repository this would cause a deadlock, because it was trying to open 2
write locks on the same repository.
The attached patch has 2 tests in it. One to make sure Branch.push()
succeeds if you read-lock the source ahead of time. And another to make
sure "bzr push" works between two branches in the same repository.
One small thing, is that bzr will actually hang for a while without the
fix to bzrlib/branch.py. This is because it is waiting for the lock to
timeout. (I assume it would fail in about 5 minutes or so).
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFF0O2RJdeBCYSNAAMRAvWRAKCXBBUA1hmZ05De/sziOgBlHc/ZdQCeMYXZ
KC/LFiwI8PfBmQWTqk29xm8=
=FeBb
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: push_readonly.patch
Type: text/x-patch
Size: 8579 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070212/c4db2b58/attachment.bin
More information about the bazaar
mailing list