Mercurial > hg
diff hgext/mq.py @ 20628:e3d1df48fcc6
cmdserver: reload mq on each runcommand request to avoid corruption
If mq was changed by another process, command server should invalidate caches.
Otherwise, mq status would go wrong.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 03 Mar 2014 19:41:26 +0900 |
parents | 8524cdf66a12 |
children | 277dc5f27310 |
line wrap: on
line diff
--- a/hgext/mq.py Mon Mar 03 19:41:23 2014 +0900 +++ b/hgext/mq.py Mon Mar 03 19:41:26 2014 +0900 @@ -3269,6 +3269,11 @@ def mq(self): return queue(self.ui, self.baseui, self.path) + def invalidateall(self): + super(mqrepo, self).invalidateall() + if localrepo.hasunfilteredcache(self, 'mq'): + self.mq.invalidate() + def abortifwdirpatched(self, errmsg, force=False): if self.mq.applied and self.mq.checkapplied and not force: parents = self.dirstate.parents()