Corrupted repositories on NFS

Matt Mackall mpm at selenic.com
Tue Nov 30 00:41:31 UTC 2010


On Tue, 2010-11-30 at 09:28 +0900, Nicolas Dumazet wrote:
> 2010/11/30 Matt Mackall <mpm at selenic.com>:
> > On Tue, 2010-11-30 at 09:05 +0900, Nicolas Dumazet wrote:
> >> Note:
> >>  add() holds a lock before walking the repository, while addremove()
> >> requires a lock only to perform the actual wctx changes. Why is that?
> >
> > Actually, it looks like neither actually grabs the lock before calling
> > walk. Possibly both are wrong.
> 
> add grabs a lock in commands.add

No sign of a lock here back to 1.0:

http://www.selenic.com/hg/file/120eccaaa522/mercurial/commands.py#l21

Nor here:

http://www.selenic.com/hg/file/120eccaaa522/mercurial/cmdutil.py#l1296

-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial-devel mailing list