Richard Lowe wrote: > David Marker <David.Marker at Sun.COM> writes: > > [...] > >> I've given locking some thought. And I think that is more grim than >> having 2 repos. You can easily end up with a locked gate until I >> come along and notice its stuck because you can't trap the abort >> from Mercurial when a pretxnchangegroup hook either returns non-zero >> OR raises an exception. So if something bad happens in sanity.py (an >> exception I didn't account for) you get rolled back. But the lock is >> not getting cleared. >> > > You can detect a stale lock however. > > lock file == symlink to destination hg-$HGUSER.$PID > > If you come to the lock and would block, check that $PID is still > around... >
Well, now I feel kinda silly. That seems quite workable... Course I'll just have to add that to my list of things to do though. So we can do the sleep a bit check if there is a lockfile still. If there is make sure that PID is around. If not blow away lock and continue. Probably write something to ui to let them know they aren't hung... Current lock is just the big gk lock everybody out kinda lock. With the ability to let just one person push (say for massive project). There I thought my TODO list was shrinking... -dvd