##// END OF EJS Templates
py3: don't use bytes with vars() or __dict__...
Martin von Zweigbergk -
r43744:be384a20 stable
parent child Browse files
Show More
@@ -691,8 +691,8 b' def repocleartagscachefunc(repo):'
691 691 def clearcache():
692 692 # _tagscache has been filteredpropertycache since 2.5 (or
693 693 # 98c867ac1330), and delattr() can't work in such case
694 if b'_tagscache' in vars(repo):
695 del repo.__dict__[b'_tagscache']
694 if '_tagscache' in vars(repo):
695 del repo.__dict__['_tagscache']
696 696
697 697 return clearcache
698 698
@@ -57,7 +57,7 b' def _parents(f, follow=True):'
57 57 # renamed filectx won't have a filelog yet, so set it
58 58 # from the cache to save time
59 59 for p in pl:
60 if not b'_filelog' in p.__dict__:
60 if not '_filelog' in p.__dict__:
61 61 p._filelog = _getflog(f._repo, p.path())
62 62
63 63 return pl
@@ -567,7 +567,7 b' class queue(object):'
567 567 return self.seriesguards
568 568
569 569 def invalidate(self):
570 for a in b'applied fullseries series seriesguards'.split():
570 for a in 'applied fullseries series seriesguards'.split():
571 571 if a in self.__dict__:
572 572 delattr(self, a)
573 573 self.applieddirty = False
@@ -857,7 +857,7 b' class unbundle20(unpackermixin):'
857 857 needed to move forward to get general delta enabled.
858 858 """
859 859 yield self._magicstring
860 assert b'params' not in vars(self)
860 assert 'params' not in vars(self)
861 861 paramssize = self._unpack(_fstreamparamsize)[0]
862 862 if paramssize < 0:
863 863 raise error.BundleValueError(
@@ -3199,7 +3199,7 b' class localrepository(object):'
3199 3199 # When using the same lock to commit and strip, the phasecache is left
3200 3200 # dirty after committing. Then when we strip, the repo is invalidated,
3201 3201 # causing those changes to disappear.
3202 if b'_phasecache' in vars(self):
3202 if '_phasecache' in vars(self):
3203 3203 self._phasecache.write()
3204 3204
3205 3205 @unfilteredmethod
@@ -171,7 +171,7 b' class mergestate(object):'
171 171 self._local = None
172 172 self._other = None
173 173 self._labels = labels
174 for var in (b'localctx', b'otherctx'):
174 for var in ('localctx', 'otherctx'):
175 175 if var in vars(self):
176 176 delattr(self, var)
177 177 if node:
@@ -196,7 +196,7 b' class mergestate(object):'
196 196 self._stateextras = {}
197 197 self._local = None
198 198 self._other = None
199 for var in (b'localctx', b'otherctx'):
199 for var in ('localctx', 'otherctx'):
200 200 if var in vars(self):
201 201 delattr(self, var)
202 202 self._readmergedriver = None
General Comments 0
You need to be logged in to leave comments. Login now