[PATCH] unbundle: don't give addchangegroup ownership of the lock

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Nov 29 13:42:16 CST 2011


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


On 29 nov. 2011, at 17:44, Matt Mackall wrote:

> On Mon, 2011-11-28 at 14:52 +0100, Pierre-Yves David wrote:
>> # HG changeset patch
>> # User Pierre-Yves David <pierre-yves.david at ens-lyon.org>
>> # Date 1322439427 -3600
>> # Branch stable
>> # Node ID e6fefdee80569d384636a5d5dd49a5caa402f968
>> # Parent  e387e760b207383c961ed8accd35583791a33bb0
>> unbundle: don't give addchangegroup ownership of the lock.
>> 
>> addchangegroup call is in a loop and may happen multiple times.
> 
> This is slightly problematic: if we have changegroup hooks, they'll get
> run under a lock, and that will be a regression. Trading a bug for a
> regression is not something we should do on purpose.

What about locking inside the loop then ? The unbundle command will lock the repo multiple time if multiple bundle are specified but both locking and hook behavior should be ok. The bookmark code should probably move in the loop too then.

Anyway the bug will disappear in two month with 2.1.0 and we don't need to discuss this to death.

- -- 
Pierre-Yves

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org

iQIcBAEBAgAGBQJO1TWmAAoJELAL+T1/FX64ZjwP/i/SL4oqzMIlGmV48nY4jc/T
P85Xe7Sj8L75Nb2ldWXiB6S03NOmbhG+XT+X0H68v2YlZ626yQHjLZQzSxh4qqTY
CfyXjs5OFo/V+WWuQjzpoDX7wf0pCItaaLAjwOUH3y6J0y8FFs3a7yKx04oCSdfG
VCOhzMo551CMnpen0Sp6PykuR3bdQbGIgV8MYVLf8l89F/Zy5IV61/c5KHL7HAWi
Os6nnEiN9hTxD7azg8FlFsA5Sy2H43yNv5Sd/I7L/hEEMBoHCxPDwoOzClGh0dfU
VznzsjA8p+FbfEnrQ5w4VfRmyHkHPKfFRmCD127E11xFsNibQu+9a/p1JGLMPo7t
zrJx16mbgdY+oB5VqlkMSziGmy0l73qe41T6cKiiWjGsz6Fo9XL+ZsI58dVT0Av7
sS6khdYa36QJpO3tY88aOUwi/3e0e0MRtGRJH4yirt6yR1WWQoP7FZC0uVRgDr9D
IRfNv5nvjQ2lIm3YgHwwr/fa6i4DYbAwt8YW5a1BDrPFO2r42RYlHjkznW09IK3v
r8/n7cHeEq1ew3q3Ozj1VBkDRqJoVP7ctkO/5TqaTIvj6sMd77nShmqRxv1UksGe
ldK2B4MlROg5xS0rzmt9fCfHXI7gyYBekD35GoEEi+N4W3dqWhSn9jKhWWWmAvVM
xhSDbhBUiYzUXv7oRiK0
=Tdmk
-----END PGP SIGNATURE-----


More information about the Mercurial-devel mailing list