comparison mercurial/localrepo.py @ 42175:d532292eff22 stable

bookmarks: use correct store for "ambiguity check" I still don't quite know what the check does, but I clearly got it wrong in 526750cdd02d (bookmarks: keep bookmarks in .hg/store if new config set, 2019-05-15). Just compare with the strings we use in @repofilecache and @storecache. These bugs were then copied to the stable branch in c2b83c957621 (localrepo: grab mixedrepostorecache class from 526750cdd02d, 2019-05-20) and 2338bdea4474 (bookmark: also make bookmark cache depends of the changelog, 2019-05-20). As a result, test-wireproto-exchangev2.t is flaky on both branches. This patch fixes that. Differential Revision: https://phab.mercurial-scm.org/D6469
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 31 May 2019 22:37:14 -0700
parents 2338bdea4474
children 3472a3f9d785 381d8fa53f34
comparison
equal deleted inserted replaced
42174:52966ddfe77b 42175:d532292eff22
131 for path, location in pathsandlocations: 131 for path, location in pathsandlocations:
132 _cachedfiles.update(pathsandlocations) 132 _cachedfiles.update(pathsandlocations)
133 133
134 def join(self, obj, fnameandlocation): 134 def join(self, obj, fnameandlocation):
135 fname, location = fnameandlocation 135 fname, location = fnameandlocation
136 if location == '': 136 if location == 'plain':
137 return obj.vfs.join(fname) 137 return obj.vfs.join(fname)
138 else: 138 else:
139 if location != 'store': 139 if location != '':
140 raise error.ProgrammingError('unexpected location: %s' % 140 raise error.ProgrammingError('unexpected location: %s' %
141 location) 141 location)
142 return obj.sjoin(fname) 142 return obj.sjoin(fname)
143 143
144 def isfilecached(repo, name): 144 def isfilecached(repo, name):
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 @mixedrepostorecache(('bookmarks', ''), ('bookmarks.current', ''), 1222 @mixedrepostorecache(('bookmarks', 'plain'), ('bookmarks.current', 'plain'),
1223 ('00changelog.i', 'store')) 1223 ('00changelog.i', ''))
1224 def _bookmarks(self): 1224 def _bookmarks(self):
1225 return bookmarks.bmstore(self) 1225 return bookmarks.bmstore(self)
1226 1226
1227 @property 1227 @property
1228 def _activebookmark(self): 1228 def _activebookmark(self):