diff --git a/contrib/perf.py b/contrib/perf.py --- a/contrib/perf.py +++ b/contrib/perf.py @@ -691,8 +691,8 @@ def repocleartagscachefunc(repo): def clearcache(): # _tagscache has been filteredpropertycache since 2.5 (or # 98c867ac1330), and delattr() can't work in such case - if b'_tagscache' in vars(repo): - del repo.__dict__[b'_tagscache'] + if '_tagscache' in vars(repo): + del repo.__dict__['_tagscache'] return clearcache diff --git a/hgext/fastannotate/context.py b/hgext/fastannotate/context.py --- a/hgext/fastannotate/context.py +++ b/hgext/fastannotate/context.py @@ -57,7 +57,7 @@ def _parents(f, follow=True): # renamed filectx won't have a filelog yet, so set it # from the cache to save time for p in pl: - if not b'_filelog' in p.__dict__: + if not '_filelog' in p.__dict__: p._filelog = _getflog(f._repo, p.path()) return pl diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -567,7 +567,7 @@ class queue(object): return self.seriesguards def invalidate(self): - for a in b'applied fullseries series seriesguards'.split(): + for a in 'applied fullseries series seriesguards'.split(): if a in self.__dict__: delattr(self, a) self.applieddirty = False diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py --- a/mercurial/bundle2.py +++ b/mercurial/bundle2.py @@ -857,7 +857,7 @@ class unbundle20(unpackermixin): needed to move forward to get general delta enabled. """ yield self._magicstring - assert b'params' not in vars(self) + assert 'params' not in vars(self) paramssize = self._unpack(_fstreamparamsize)[0] if paramssize < 0: raise error.BundleValueError( diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -3199,7 +3199,7 @@ class localrepository(object): # When using the same lock to commit and strip, the phasecache is left # dirty after committing. Then when we strip, the repo is invalidated, # causing those changes to disappear. - if b'_phasecache' in vars(self): + if '_phasecache' in vars(self): self._phasecache.write() @unfilteredmethod diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -171,7 +171,7 @@ class mergestate(object): self._local = None self._other = None self._labels = labels - for var in (b'localctx', b'otherctx'): + for var in ('localctx', 'otherctx'): if var in vars(self): delattr(self, var) if node: @@ -196,7 +196,7 @@ class mergestate(object): self._stateextras = {} self._local = None self._other = None - for var in (b'localctx', b'otherctx'): + for var in ('localctx', 'otherctx'): if var in vars(self): delattr(self, var) self._readmergedriver = None