Mercurial > public > mercurial-scm > hg
comparison mercurial/localrepo.py @ 42324:2338bdea4474 stable
bookmark: also make bookmark cache depends of the changelog
Since the changelog is also used during the parsing of bookmark data, it should
be listed as a file cache dependency. This fix the race condition we just
introduced a test for.
This is a simple fix that might lead bookmark data to be invalidated more often
than necessary. We could have more complicated code to deal with this race in a
more "optimal" way. I feel it would be unsuitable for stable.
In addition, the performance impact of this is probably minimal and I don't
foresee the more advanced fix to actually be necessary.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Mon, 20 May 2019 10:08:28 +0200 |
parents | c2b83c957621 |
children | ffab9eed3921 d532292eff22 |
comparison
equal
deleted
inserted
replaced
42323:c2b83c957621 | 42324:2338bdea4474 |
---|---|
1217 In other word, there is always only one level of `repoview` "filtering". | 1217 In other word, there is always only one level of `repoview` "filtering". |
1218 """ | 1218 """ |
1219 cls = repoview.newtype(self.unfiltered().__class__) | 1219 cls = repoview.newtype(self.unfiltered().__class__) |
1220 return cls(self, name, visibilityexceptions) | 1220 return cls(self, name, visibilityexceptions) |
1221 | 1221 |
1222 @repofilecache('bookmarks', 'bookmarks.current') | 1222 @mixedrepostorecache(('bookmarks', ''), ('bookmarks.current', ''), |
1223 ('00changelog.i', 'store')) | |
1223 def _bookmarks(self): | 1224 def _bookmarks(self): |
1224 return bookmarks.bmstore(self) | 1225 return bookmarks.bmstore(self) |
1225 | 1226 |
1226 @property | 1227 @property |
1227 def _activebookmark(self): | 1228 def _activebookmark(self): |