[PATCH] unbundle: don't give addchangegroup ownership of the lock
Matt Mackall
mpm at selenic.com
Tue Nov 29 14:13:04 CST 2011
On Tue, 2011-11-29 at 20:42 +0100, Pierre-Yves David wrote:
> -----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.
Short of backporting the locking change, I don't think there's a good
fix here. And I think that's too big of a change to put in for Thursday.
--
Mathematics is the supreme nostalgia of our time.
More information about the Mercurial-devel
mailing list