obsolete: use native string when peeking in __dict__
authorAugie Fackler <augie@google.com>
Wed, 17 Jan 2018 21:46:09 -0500
changeset 35837 d8f891ec5d7d
parent 35836 d4e5b2653693
child 35838 f484b9d95c23
obsolete: use native string when peeking in __dict__ # skip-blame just an r prefix on a few string literals Differential Revision: https://phab.mercurial-scm.org/D1896
mercurial/obsolete.py
--- a/mercurial/obsolete.py	Wed Jan 17 21:45:15 2018 -0500
+++ b/mercurial/obsolete.py	Wed Jan 17 21:46:09 2018 -0500
@@ -570,7 +570,7 @@
         return len(self._all)
 
     def __nonzero__(self):
-        if not self._cached('_all'):
+        if not self._cached(r'_all'):
             try:
                 return self.svfs.stat('obsstore').st_size > 1
             except OSError as inst:
@@ -727,11 +727,11 @@
         markers = list(markers) # to allow repeated iteration
         self._data = self._data + rawdata
         self._all.extend(markers)
-        if self._cached('successors'):
+        if self._cached(r'successors'):
             _addsuccessors(self.successors, markers)
-        if self._cached('predecessors'):
+        if self._cached(r'predecessors'):
             _addpredecessors(self.predecessors, markers)
-        if self._cached('children'):
+        if self._cached(r'children'):
             _addchildren(self.children, markers)
         _checkinvalidmarkers(markers)