[PATCH] histedit: add support for exec/x command to histedit (issue4036)

Yuya Nishihara yuya at tcha.org
Sun Oct 25 12:08:56 CDT 2015


On Sun, 25 Oct 2015 16:33:15 +0000, Piotr Listkiewicz wrote:
> >
> >  My point here is that if some command changed stuff (new commit,
> >
> >     bookmark location etc), some of it might not be detected by the
> >     current process that already parsed them from disk and naively
> >     assume they did not changed since it hold the lock.
> >     I would like to see some investigation to know if we need to do
> >     something special (or if it is already handled, for example by the
> >     lock). to make sure we are safe here.
> >
> > We should talk about this, i still have no idea how can i check this or
> > what to do with it
> > Sid, Foozy and yuya are good people discuss this
> >
> From my investigation and talk with yuya i think that all caches are
> cleared:
> 
> finally:
>     self.state.wlock = repo.wlock(times=wlockheld)
>     self.state.lock   = repo.lock(times=lockheld)
> 
> repo.wlock invoke lock constructor with acquirefn callback set to
> localrepo.invalidatedirstate.
> 
> repo.lock invoke lock constructor with acquirefn callback set to
> localrepo.invalidate.
> 
> invalidateall function in localrepository has invocation only to invalidate
> and invalidatedirstate.
> 
> So if acquiring those two locks dont clear all caches that would mean that
> localrepository.invalidateall has bug right now.

One thing I forgot to mention, invalidateall() is wrapped by MQ. It is
necessary for command server to clear mq status and mq path. So "histedit exec"
might need to call invalidateall().

Regards,


More information about the Mercurial-devel mailing list