changeset 42421: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 52966ddfe77b
children 381d8fa53f34 b6387a65851d
files mercurial/localrepo.py
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/localrepo.py	Wed Jun 05 10:14:19 2019 -0400
+++ b/mercurial/localrepo.py	Fri May 31 22:37:14 2019 -0700
@@ -133,10 +133,10 @@
 
     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 @@
         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)