Mercurial > hg
changeset 14931:a710936c3037
localrepo: refresh filecache entries after releasing a repo.lock()
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Mon, 25 Jul 2011 15:08:37 +0300 |
parents | 372d9d8b1da4 |
children | d3ac759a6d66 |
files | mercurial/localrepo.py |
diffstat | 1 files changed, 8 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/localrepo.py Mon Jul 25 15:08:37 2011 +0300 +++ b/mercurial/localrepo.py Mon Jul 25 15:08:37 2011 +0300 @@ -842,7 +842,14 @@ l.lock() return l - l = self._lock(self.sjoin("lock"), wait, self.store.write, + def unlock(): + self.store.write() + for k, ce in self._filecache.items(): + if k == 'dirstate': + continue + ce.refresh() + + l = self._lock(self.sjoin("lock"), wait, unlock, self.invalidate, _('repository %s') % self.origroot) self._lockref = weakref.ref(l) return l