Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/commandserver.py @ 20627:a42ea6d209e6
localrepo: add hook point to invalidate everything on each command-server run
MQ extension will wrap this function to invalidate its state.
repo.invalidate cannot be wrapped for this purpose because qpush obtains
repo.lock in the middle of the operation, triggering repo.invalidate. Also,
it seems wrong to obtain lock earlier because mq data is non-store parts.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Mon, 03 Mar 2014 19:41:23 +0900 |
parents | b04cc8651a63 |
children | 5d4606bec54c |
comparison
equal
deleted
inserted
replaced
20625:7cbc6e228999 | 20627:a42ea6d209e6 |
---|---|
186 self.repo.baseui = copiedui | 186 self.repo.baseui = copiedui |
187 # clone ui without using ui.copy because this is protected | 187 # clone ui without using ui.copy because this is protected |
188 repoui = self.repoui.__class__(self.repoui) | 188 repoui = self.repoui.__class__(self.repoui) |
189 repoui.copy = copiedui.copy # redo copy protection | 189 repoui.copy = copiedui.copy # redo copy protection |
190 self.repo.ui = self.repo.dirstate._ui = repoui | 190 self.repo.ui = self.repo.dirstate._ui = repoui |
191 self.repo.invalidate() | 191 self.repo.invalidateall() |
192 self.repo.invalidatedirstate() | |
193 | 192 |
194 req = dispatch.request(args[:], copiedui, self.repo, self.cin, | 193 req = dispatch.request(args[:], copiedui, self.repo, self.cin, |
195 self.cout, self.cerr) | 194 self.cout, self.cerr) |
196 | 195 |
197 ret = dispatch.dispatch(req) or 0 # might return None | 196 ret = dispatch.dispatch(req) or 0 # might return None |