Mercurial > hg
comparison 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 |
comparison
equal
deleted
inserted
replaced
20627:a42ea6d209e6 | 20628:e3d1df48fcc6 |
---|---|
3267 class mqrepo(repo.__class__): | 3267 class mqrepo(repo.__class__): |
3268 @localrepo.unfilteredpropertycache | 3268 @localrepo.unfilteredpropertycache |
3269 def mq(self): | 3269 def mq(self): |
3270 return queue(self.ui, self.baseui, self.path) | 3270 return queue(self.ui, self.baseui, self.path) |
3271 | 3271 |
3272 def invalidateall(self): | |
3273 super(mqrepo, self).invalidateall() | |
3274 if localrepo.hasunfilteredcache(self, 'mq'): | |
3275 self.mq.invalidate() | |
3276 | |
3272 def abortifwdirpatched(self, errmsg, force=False): | 3277 def abortifwdirpatched(self, errmsg, force=False): |
3273 if self.mq.applied and self.mq.checkapplied and not force: | 3278 if self.mq.applied and self.mq.checkapplied and not force: |
3274 parents = self.dirstate.parents() | 3279 parents = self.dirstate.parents() |
3275 patches = [s.node for s in self.mq.applied] | 3280 patches = [s.node for s in self.mq.applied] |
3276 if parents[0] in patches or parents[1] in patches: | 3281 if parents[0] in patches or parents[1] in patches: |