[PATCH 2 of 2 RFC] localrepo: make it possible to use flock in a repo

Jun Wu quark at fb.com
Fri May 19 12:41:08 EDT 2017


Excerpts from Jun Wu's message of 2017-05-19 09:33:12 -0700:
> Note: in weird setups, like .hg/store lives on NFS when .hg is on local
> disk, the lock is not safe. But we have broken locks on that setup already,
> so this patch is at least not making things worse. It even makes things
> better in local shared repo use-case [1].
> 
> [1]: Consider two repos sharing a store: repo1/.hg and repo2/.hg and
> shared/.hg/store. We should really make "repo.lock()" write a lock file at
> "shared/.hg/store/lock" but not "repo1/.hg/lock" or "repo2/.hg/lock".  With
> this patch, "shared/.hg/store" gets locked properly and there is no such
> problem.

Sorry but I realized this is not true. I thought both wlock and lock are
using vfs, but one of them uses svfs. So it should just work as expected.


More information about the Mercurial-devel mailing list