py3: invalidate repository cache with system-string keys
authorYuya Nishihara <yuya@tcha.org>
Tue, 16 Oct 2018 08:29:24 +0200
changeset 40360 dee73a97e132
parent 40359 558114fa7bc1
child 40361 b7de186efd82
py3: invalidate repository cache with system-string keys # skip-blame just a few r'' prefixes
hgext/mq.py
mercurial/localrepo.py
--- a/hgext/mq.py	Tue Oct 16 08:20:03 2018 +0200
+++ b/hgext/mq.py	Tue Oct 16 08:29:24 2018 +0200
@@ -3511,9 +3511,9 @@
 
         def invalidateall(self):
             super(mqrepo, self).invalidateall()
-            if localrepo.hasunfilteredcache(self, 'mq'):
+            if localrepo.hasunfilteredcache(self, r'mq'):
                 # recreate mq in case queue path was changed
-                delattr(self.unfiltered(), 'mq')
+                delattr(self.unfiltered(), r'mq')
 
         def abortifwdirpatched(self, errmsg, force=False):
             if self.mq.applied and self.mq.checkapplied and not force:
--- a/mercurial/localrepo.py	Tue Oct 16 08:20:03 2018 +0200
+++ b/mercurial/localrepo.py	Tue Oct 16 08:29:24 2018 +0200
@@ -2047,9 +2047,9 @@
 
     def invalidatecaches(self):
 
-        if '_tagscache' in vars(self):
+        if r'_tagscache' in vars(self):
             # can't use delattr on proxy
-            del self.__dict__['_tagscache']
+            del self.__dict__[r'_tagscache']
 
         self.unfiltered()._branchcaches.clear()
         self.invalidatevolatilesets()