D7227: localrepo: use str for lookup in vars()
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Tue Nov 5 05:18:58 UTC 2019
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
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
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list