Patchwork ***UNCHECKED*** D7227: localrepo: use str for lookup in vars()

login
register
mail settings
Submitter phabricator
Date Nov. 5, 2019, 5:18 a.m.
Message ID <differential-rev-PHID-DREV-wrysfpyns7ljkseko2yr-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42744/
State Superseded
Headers show

Comments

phabricator - Nov. 5, 2019, 5:18 a.m.
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  vars() returns a dict of str. So always use a native str for
  the key lookup.

REPOSITORY
  rHG Mercurial

BRANCH
  stable

REVISION DETAIL
  https://phab.mercurial-scm.org/D7227

AFFECTED FILES
  mercurial/localrepo.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py
--- a/mercurial/localrepo.py
+++ b/mercurial/localrepo.py
@@ -1417,7 +1417,7 @@ 
 
     def _refreshchangelog(self):
         """make sure the in memory changelog match the on-disk one"""
-        if b'changelog' in vars(self) and self.currenttransaction() is None:
+        if 'changelog' in vars(self) and self.currenttransaction() is None:
             del self.changelog
 
     @property