# HG changeset patch # User Martin von Zweigbergk # Date 2019-06-01 05:37:14 # Node ID d532292eff22b095c994ffedcd4bf98f84f873aa # Parent 52966ddfe77b6b1dbfbcfc0a6ac92065727c4001 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 diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -133,10 +133,10 @@ class mixedrepostorecache(_basefilecache def join(self, obj, fnameandlocation): fname, location = fnameandlocation - if location == '': + if location == 'plain': return obj.vfs.join(fname) else: - if location != 'store': + if location != '': raise error.ProgrammingError('unexpected location: %s' % location) return obj.sjoin(fname) @@ -1219,8 +1219,8 @@ class localrepository(object): cls = repoview.newtype(self.unfiltered().__class__) return cls(self, name, visibilityexceptions) - @mixedrepostorecache(('bookmarks', ''), ('bookmarks.current', ''), - ('00changelog.i', 'store')) + @mixedrepostorecache(('bookmarks', 'plain'), ('bookmarks.current', 'plain'), + ('00changelog.i', '')) def _bookmarks(self): return bookmarks.bmstore(self)